1、错误所在行
summary_ = sess.run(merged_summary, feed_dict={x :batch_x, y: batch_y})
writer.add_summary(summary_,i)
2、错误提示
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'input/input_x' with dtype float and shape [?,300,23,1]
[[Node: input/input_x = Placeholder[dtype=DT_FLOAT, shape=[?,300,23,1], _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]
3、参考stackoverflow/error when computing summaries
# tf==1.4.0
tf.summary.scalar('loss', loss)
tf.summary.scalar('accuracy', accuracy)
merged_summary = tf.summary.merge_all()
修改为
loss_summary = tf.summary.histogram("loss", loss)
accuracy_summary = tf.summary.histogram('accuracy', accuracy)
merged_summary = tf.summary.merge([accuracy_summary,loss_summary])