参考tensorflow实践,版本不一致导致一些奇葩错误
错误信息为TypeError: Fetch argument None has invalid type
出错的地方为:
_,step,summary=sess.run([output,increament_step,merge_summary],feed_dict=feed_dicta)
merge_summary为None->报错
其中merge_summary=tf.summary.merge_all()
解决:在代码
tf.summary.scalar(name="total_summary",tensor=update_total,collections=b'sum of output over time')
中将collections去除,即
tf.summary.scalar(name="total_summary",tensor=update_total)
就这样