AttributeError: module 'tensorflow' has no attribute 'enable_eager_execution'

Traceback (most recent call last):
  File "linear_regression_eager_api.py", line 15, in <module>
    tf.enable_eager_execution()
AttributeError: module 'tensorflow' has no attribute 'enable_eager_execution'

在tensorflow模型训练的遇到这个报错

原因:tensorflow版本太老了,没有'enable_eager_execution'这个属性方法
解决:pip install --upgrade tensorflow更新tensorflow

posted @ 2019-03-08 16:00  努力耕地的小码农  阅读(10533)  评论(1)    收藏  举报