Tensorflow "TypeError: Fetch arg
2019-06-10 本文已影响0人
Nevrast
Tensorflow Session.run
过程中的报错,run
的函数参数为:
run(self, fetches, feed_dict=None, options=None, run_metadata=None)
tensorflow在Session.run
过程中会通过for_fetch(fetch)
staticmethod来检查fetch的值,如果遇到fetch is None
就会抛出这个错误。
遇到这个错误,需要去检查Session.run
的fetch
(可以是list, dict, tensor_name)是否有None值;或者是训练过程中是否可能变成None值。