python - Bazel & Tensorflow: Inception v3 retraining: AttributeError: 'int' object attribute '__doc__' is read-only -


i following tutorial retrain top layer of inception v3 neural net: https://www.youtube.com/watch?v=m2d02eztb4s https://www.tensorflow.org/tutorials/image_retraining

i have set virtualbox running ubuntu 14.04.5 lts 64bit

python 2.7.6

tensorflow 1.3.0

bazel build label: 0.5.3

however, when use command

bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir /media/myimagedir 

then process diverges tutorial. 2 import errors occur solved installing packages.

file "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/ops.py", line 28, in <module>     autograd import core ag_core importerror: no module named autograd  file "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/ops/variable_scope.py", line 24, in <module>     import enum  # pylint: disable=g-bad-import-order importerror: no module named enum 

after installing autograd , enum, when trying execute command retrain again, following error occurs:

traceback (most recent call last): file "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/examples/image_retraining/retrain.py", line 108, in <module> import tensorflow tf file "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/__init__.py", line 24, in <module> tensorflow.python import * file "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 63, in <module> tensorflow.python.framework.framework_lib import * file "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/framework_lib.py", line 102, in <module> tensorflow.python.framework.importer import import_graph_def file "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/importer.py", line 30, in <module> tensorflow.python.framework import function file "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/function.py", line 34, in <module> tensorflow.python.ops import variable_scope vs file "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/ops/variable_scope.py", line 191, in <module> """ attributeerror: 'int' object attribute '__doc__' read-only 

line 191 of file "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/ops/variable_scope.py" follows:

auto_reuse.__doc__ = """ when passed in value `reuse` flag, auto_reuse indicates get_variable() should create requested variable if doesn't exist or, if exist, return it. """ 

now don't want meddle code not custom code i've written. suspect there problem, absolutely clueless might be. i'm hoping here has had similar problem and/or can give me advice.

i've come across too, , noticed there issue in tensorflow recently. solution following workaround:

  • uninstall enum, if you've installed it: sudo pip remove enum
  • install compatibility version of enum: sudo apt-get install python-enum34
  • try again.

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -