module 'tensorflow' has no attribute 'placeholder' for tensorflow 2.2.0 code example
Example 1: AttributeError: module 'tensorflow' has no attribute 'placeholder' site:stackoverflow.com
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
Example 2: AttributeError: module 'tensorflow' has no attribute 'placeholder'
#replace import tensorflow as tf by following
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()