私は現在インセプションv3のニューラルネットのトップ層を再教育するために、このチュートリアルを次のです: https://www.youtube.com/watch?v=m2D02eZTB4s https://www.tensorflow.org/tutorials/image_retrainingBazel&Tensorflow:インセプションv3の再トレーニング:はAttributeError:「int型のオブジェクトの属性の__doc__は「読み取り専用です
私は2.7.6
tensorflow 1.3.0
bazelのBUI VirtualBoxの実行中のUbuntu 14.04.5 LTS 64ビットに
のpythonを設定していますLDラベル:私はコマンド
bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir /media/myImageDir
を使用する場合0.5.3
しかし、その後、私のプロセスはチュートリアルから発散します。 2つのインポートエラーが発生し、パッケージをインストールすることで簡単に解決されます。
File "/home/tensorflow/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
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
autogradと列挙型をインストールした後、コマンドを実行しようとしたときには、再び再教育するために、次のエラーが発生します。ファイル「/ホーム/ tensorflow/tensorflow/bazel-の
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 as tf
File "/home/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/__init__.py", line 24, in <module>
from 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>
from 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>
from 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>
from 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>
from tensorflow.python.ops import variable_scope as 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__' is read-only
ライン191をビン/ tensorflow /例/ image_retraining/retrain.runfiles/org_tensorflow/tensorflow /パイソン/ OPS/variable_scope.py」は次のとおりです。
AUTO_REUSE.__doc__ = """
When passed in as the value for the `reuse` flag, AUTO_REUSE indicates that
get_variable() should create the requested variable if it doesn't exist or, if
it does exist, simply return it.
"""
は今、私は実際にそれのように、このコードで干渉するにしたくありません私が書いたカスタムコードではありません。私はそこに別の問題があると思うが、私はそれが何であるか絶対に無知だ。私はここにいる誰かが同様の問題を抱えていると思っています。そして/または私に助言を与えることができます。
tensorflowを正しくインストールしなかったようですが、テンソルフローをインポートしようとするとエラーが発生します。テンソルフローを再インストールしてみてください –
もし私がテンソルフローをPythonインタプリタにインポートすると、 –