ImportError:无法导入名称'gen_batch_ops'

时间:2018-01-27 19:09:34

标签: python tensorflow

我想使用Eager Execution,但是当我想导入eager模块时,错误会增加。

出了什么问题?提前谢谢。

以下是错误消息。

import tensorflow
import tensorflow.contrib.eager as tfe

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-4-6548a27ca58e> in <module>()
      1 import tensorflow as tf
----> 2 import tensorflow.contrib.eager as tfe
      3 tfe.enable_eager_execution()

~\Anaconda3\lib\site-packages\tensorflow\contrib\__init__.py in <module>()
     20 
     21 # Add projects here, they will show up under tf.contrib.
---> 22 from tensorflow.contrib import batching
     23 from tensorflow.contrib import bayesflow
     24 from tensorflow.contrib import cloud

~\Anaconda3\lib\site-packages\tensorflow\contrib\batching\__init__.py in     <module>()
     21 from __future__ import print_function
     22 
---> 23 from tensorflow.contrib.batching.python.ops.batch_ops import batch_function
     24 
     25 from tensorflow.python.util.all_util import remove_undocumented

~\Anaconda3\lib\site-packages\tensorflow\contrib\batching\python\ops\batch_ops.py in <module>()
     20 
     21 from tensorflow.python.framework import ops
---> 22 from tensorflow.python.ops import gen_batch_ops
     23 # go/tf-wildcard-import
     24 # pylint: disable=wildcard-import

ImportError: cannot import name 'gen_batch_ops'

0 个答案:

没有答案