AttributeError: module 'tensorflow' has no attribute 'Session'
AttributeError: module 'tensorflow' has no attribute 'truncated_normal_initializer'
解决办法:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
AttributeError: module 'tensorflow' has no attribute 'Session'
AttributeError: module 'tensorflow' has no attribute 'truncated_normal_initializer'
解决办法:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()