AttributeError: module 'tensorflow' has no attribute 'placeholder'主要是对应的tensorflow版本不一的问题。
将
import tensorflow as tf
改为
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
AttributeError: module 'tensorflow' has no attribute 'placeholder'主要是对应的tensorflow版本不一的问题。
将
import tensorflow as tf
改为
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()