出现问题
原因:Tensorflow 2.0移除了Tensorflow 1.0的一些东西,比如Session()
解决:如下图,可以加一句 tf.compat.v1.disable_eager_execution()
参考链接 “https://vispud.blogspot.com/2019/05/tensorflow200a0-attributeerror-module.html”
Tensorflow 2.0.0 - AttributeError: module 'tensorflow' has no attribute 'Session'
最新推荐文章于 2022-07-07 16:16:35 发布