參考tensorflow實踐坛掠,版本不一致導(dǎo)致一些奇葩錯誤
錯誤信息為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)
就這樣