tf.app.run出现错误AttributeError: module '__main__' has no attribute 'main'

我在运行tf.app.run的时候出现AttributeError: module ‘main’ has no attribute ‘main’的错误,网上没有查到有用的资料,但是看到默认传递的是main()函数,可能是这个出现了错误,因此我把main()函数换成了其他名字go()。
并且将go()送入run中,即 tf.app.run(go()),就避免这个问题了。

猜你喜欢

转载自blog.csdn.net/hampeter/article/details/81813419