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.runfetch(可以是list, dict, tensor_name)是否有None值;或者是训练过程中是否可能变成None值。

上一篇下一篇

猜你喜欢

热点阅读