2 m0 38140851 m0_38140851 于 2017.09.18 16:51 提问

tensorboard使用的问题

如何将accuracy生成图像添加到tensorboard中?

for i in range(1000):
batch_xs,batch_ys = mnist.train.next_batch(100)
sess.run(train_step,feed_dict={xs:batch_xs,ys:batch_ys})

if i % 50 == 0:
   accuracy = compute_accuracy(mnist.test.images,mnist.test.labels)
   print(accuracy)
   result = sess.run(merged,feed_dict={xs:batch_xs,ys:batch_ys})
   writer.add_summary(result,i)

1个回答

yeahDeDiQiZhang
yeahDeDiQiZhang   2017.10.16 09:46

accuracy是scalar,用tf.summary.scalar

Csdn user default icon
上传中...
上传图片
插入图片