AttributeError: module ‘tensorflow’ has no attribute ‘app’
solution:
import tensorflow ad tf 改为 import tensorflow.compat.v1 as tf
之后又报错:
sess.run(tf.global_variables_initializer())
TypeError: Fetch argument None has invalid type <class ‘NoneType’>
添加
#import tensorflow ad tf
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()