tensorflow使用报错:AttributeError: module 'tensorflow' has no attribute 'Session'
安装完tensorflow后运行:
import tensorflow as tf
tf.Session()
报错:AttributeError: module ‘tensorflow’ has no attribute ‘Session’
然后修改为:
tf.compat.v1.Session()
import tensorflow as tf
tf.Session()
报错:AttributeError: module ‘tensorflow’ has no attribute ‘Session’
然后修改为:
tf.compat.v1.Session()