INNER CODE UNIT · Python
batch_incomplete
zuruoke/watermark-removal · inpaint_model.py:285
batch_incomplete = batch_pos * (1. - masks)
if FLAGS.guided:
edge = edge * masks[:, :, :, 0:1]
xin = tf.concat([batch_incomplete, edge], axis=3)
else:
xin = batch_incomplete
# inpaint
x1, x2, flow = self.build_inpaint_net(
xin, masks, reuse=reuse, training=is_training)
batch_predict = x2
# apply mask and reconstruct
batch_complete = batch_predict*masks + batch_incomplete*(1-masks)
return batch_complete