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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM