INNER CODE UNIT · Python
build_static_infer_graph
zuruoke/watermark-removal · inpaint_model.py:263
def build_static_infer_graph(self, FLAGS, batch_data, name):
"""
"""
# generate mask, 1 represents masked point
bbox = (tf.constant(FLAGS.height//2), tf.constant(FLAGS.width//2),
tf.constant(FLAGS.height), tf.constant(FLAGS.width))
return self.build_infer_graph(FLAGS, batch_data, bbox, name)
def build_server_graph(self, FLAGS, batch_data, reuse=False, is_training=False):
"""
"""
# generate mask, 1 represents masked point
if FLAGS.guided:
batch_raw, edge, masks_raw = tf.split(batch_data, 3, axis=2)
edge = edge[:, :, :, 0:1] / 255.
edge = tf.cast(edge > FLAGS.edge_threshold, tf.float32)
else: