我正在尝试为 MNIST 初学者教程生成图表,但出现以下错误。由于某种原因,merged_summary_op 对象为 None。
Traceback (most recent call last):
File "mnist1.py", line 48, in <module>
summary_str = sess.run(merged_summary_op)
File "/home/vagrant/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 307, in run
% (subfetch, fetch, type(subfetch), e.message))
TypeError: Fetch argument None of None has invalid type <type 'NoneType'>, must be a string or Tensor. (Can not convert a NoneType into a Tensor or Operation.)
我想我在这里错过了一步。我先启动了会话,然后运行了语句:
merged_summary_op = tf.merge_all_summaries()