如何在张量板上显示我所有的图像?
How to show all my images in tensorboard?
我只看到当前驻留在符号张量(logits、标签)中的图像:
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()})
如何同时显示所有图片?
我希望我的所有图像都像在图库中一样具有此视图:
图像张量的第一维和 tf.summary.image
的 max_output
参数定义了张量板图库中的图像数量。由于您一次写入 1 张图像,因此现有图像将被覆盖。
不是迭代,而是连接 4 个图像,使得 tn_logits
和 t_label
的形状为 [4, h, w, 1]
。
然后在 tensorboard 中,您将有 Train/logits/image/0
、Train/label/image/1
、Train/label/image/2
和 Train/label/image/3
条目用于 tn_logits
。
我只看到当前驻留在符号张量(logits、标签)中的图像:
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()})
如何同时显示所有图片?
我希望我的所有图像都像在图库中一样具有此视图:
图像张量的第一维和 tf.summary.image
的 max_output
参数定义了张量板图库中的图像数量。由于您一次写入 1 张图像,因此现有图像将被覆盖。
不是迭代,而是连接 4 个图像,使得 tn_logits
和 t_label
的形状为 [4, h, w, 1]
。
然后在 tensorboard 中,您将有 Train/logits/image/0
、Train/label/image/1
、Train/label/image/2
和 Train/label/image/3
条目用于 tn_logits
。