注:安裝好Tensorflow2.0后,當使用Session時,報錯AtributeError: module ‘tensorflow’ has no attribute ‘Session’:
錯誤的意思是tensorflow模塊沒有Session屬性,后來查閱資料發現,tensorflow2.0版本中的確沒有Session這個屬性
解決問題如下:`
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
sess = tf.compat.v1.Session()

