def image_summary(x, tensor_name=None, max_images=3): if tensor_name is None: tensor_name = x.op.name tf.summary.image(tensor_name, x)