带有“导入错误:没有名为枚举的模块”的Tensorflow Frozen_graph错误

时间:2018-08-17 04:00:15

标签: python tensorflow

我使用bazel-bin/tensorflow/python/tools/freeze_graph冻结了我的图表。该程序几天前已与bazel兼容。
但这返回错误:

Traceback (most recent call last):
  File "/home/roche/git/download/tensorflow-1.10.0/bazel-bin/tensorflow/python/tools/freeze_graph.runfiles/org_tensorflow/tensorflow/python/tools/freeze_graph.py", line 48, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/roche/git/download/tensorflow-1.10.0/bazel-bin/tensorflow/python/tools/freeze_graph.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 63, in <module>
    from tensorflow.python.framework.framework_lib import *  # pylint: disable=redefined-builtin
  File "/home/roche/git/download/tensorflow-1.10.0/bazel-bin/tensorflow/python/tools/freeze_graph.runfiles/org_tensorflow/tensorflow/python/framework/framework_lib.py", line 52, in <module>
    from tensorflow.python.framework.importer import import_graph_def
  File "/home/roche/git/download/tensorflow-1.10.0/bazel-bin/tensorflow/python/tools/freeze_graph.runfiles/org_tensorflow/tensorflow/python/framework/importer.py", line 27, in <module>
    from tensorflow.python.framework import function
  File "/home/roche/git/download/tensorflow-1.10.0/bazel-bin/tensorflow/python/tools/freeze_graph.runfiles/org_tensorflow/tensorflow/python/framework/function.py", line 39, in <module>
    from tensorflow.python.ops import variable_scope as vs
  File "/home/roche/git/download/tensorflow-1.10.0/bazel-bin/tensorflow/python/tools/freeze_graph.runfiles/org_tensorflow/tensorflow/python/ops/variable_scope.py", line 24, in <module>
    import enum  # pylint: disable=g-bad-import-order

这是我的环境规范:

Sys:Debian 9.5
Python:python3.5.3
Tensorflow:张量流(1.10.0)

0 个答案:

没有答案