我正在按照位于here的Tensorflow图像再训练教程。Tensorflow图像再训练教程Bazel错误
当我尝试使用巴泽勒运行此命令:
bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir ~/flower_photos
我收到以下错误:
Traceback (most recent call last):
File "/home/j/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/examples/image_retraining/retrain.py", line 108, in <module>
import tensorflow as tf
File "/home/j/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/j/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 63, in <module>
from tensorflow.python.framework.framework_lib import *
File "/home/j/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/framework_lib.py", line 76, in <module>
from tensorflow.python.framework.ops import Graph
File "/home/j/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/ops.py", line 28, in <module>
from autograd import core as ag_core
ModuleNotFoundError:无模块名为 'autograd'
然而,当我使用python命令运行它
python tensorflow/examples/image_retraining/retrain.py --image_dir ~/flower_photos
它运行正常并且不会产生此错误。
- Ubuntu的17.04
- 的Python 3.6.1
- 阿纳康达4.4:
我从
~/tensorflow
目录(git仓库的顶部)环境同时运行上述命令的.0
- Bazel 0.5.4
- Tensorflow 1.3(无GPU)(v1.3.0-rc2-20-g0787eee 1.3.0)