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