【发布时间】:2017-08-09 07:45:57
【问题描述】:
我只看到当前位于符号张量(logits、label)中的图像:
with tf.name_scope("Train"):
optimizer = tf.train.AdamOptimizer(FLAGS.learning_rate).minimize(cost_function)
tf.summary.image('logits', tn_logits, max_outputs=4)
tf.summary.image('label', t_label, max_outputs=4)
在会话中,我循环输入网络图像。
for epoch in range(FLAGS.training_epochs):
for img in images:
_, summary_str, costs = sess.run([optimizer, merged_summary_op, cost_function],
feed_dict={t_im0: img.l_img.eval(), t_im1: img.r_img.eval(),
t_label: img.mask.eval()})
如何同时显示所有图像?
【问题讨论】:
-
如果
tn_logits和t_label是形状为[batch_size, height, width, channels]的张量,则 tensorboard 中将有 4 个 (max_outputs=4) 图像。你有不同的结果还是想要别的东西? -
是的,它们的形状为 [1, h, w, 1]。我刚刚尝试了 4 个结果,但它总是停留 2 个。