当前位置:   article > 正文

解决AttributeError: module 'tensorflow' has no attribute 'keras'问题

attributeerror: module 'tensorflow' has no attribute 'keras

在学习《深度学习应用开发Tensorflow实践》课程泰坦尼克号旅客生存预测课程,使用tensorflow高级API kares时,出现AttributeError: module ‘tensorflow’ has no attribute 'keras’问题
在这里插入图片描述
解决方法:在这里插入图片描述model=tf.keras.models.Sequential()替换成model=tf.contrib.keras.models.Sequential(),成功执行
原因:
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/225051?site
推荐阅读
相关标签
  

闽ICP备14008679号