In [1]:
import tensorflow as tf

print(tf.__version__)
2.0.0
In [2]:
placeholder = tf.placeholder(shape = [3, 3], dtype = tf.float32)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-d67b130ae096> in <module>
----> 1 placeholder = tf.placeholder(shape = [3, 3], dtype = tf.float32)

AttributeError: module 'tensorflow' has no attribute 'placeholder'
In [3]:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
WARNING:tensorflow:From C:\Users\DavorJordacevic\Anaconda3\lib\site-packages\tensorflow_core\python\compat\v2_compat.py:65: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
In [4]:
placeholder = tf.placeholder(shape = [3, 3], dtype = tf.float32)