嗨,我正在浏览谷歌在https://github.com/tensorflow/models提供的 /models-master/tutorials/image/cifar10 示例。
我在虚拟环境中运行 tensorflow-1.0.1 和 python 3.5。
从命令行,并在 virtualenv 中,运行: python3 cifar10_train.py 工作正常。
但是当我尝试时:pudb3 cifar10_train.py
我收到此错误:
回溯(最近一次调用):
文件“~/interpreters/p35/lib/python3.5/site-packages/tensorflow/python/platform/app.py”,第 44 行,运行
_sys.exit(main(_sys. argv[:1] + flags_passthrough))
TypeError: main() 接受 0 个位置参数,但给出了 1 个
检查参数给出:
打印 (_sys.argv[:1])
['cifar10_train.py']
打印 (flags_passthrough)
[]
我知道 pudb 位于从命令行运行代码的同一 virtualenv 中,因为 pudb 很好地通过了 tensorflow 导入,并且 virtualenv 是 tensorflow 包所在的唯一位置。
我假设这是在 pudb 引入的某些层之间传递的一些问题......有没有人有一个快速的建议来解决这个问题......我只想逐步完成代码:)
谢谢,
nt