报错:AttributeError: module ‘tensorflow‘ has no attribute ‘session‘
AttributeError: module ‘tensorflow’ has no attribute ‘session’
出现问题:
AttributeError: module 'tensorflow' has no attribute 'session'
解决方法:
方法一:
将
import tensorflow as tf
改为
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
方法二:
可能是程序中session的拼写
原创
2022-01-19 14:27:43 ·
851 阅读 ·
0 评论