I am trying to learn TensorFlow. Currently, I am working with placeholders. When I tried to create the placeholder, I got an error: RuntimeError: tf.placeholder() is n
Assume you are using Tensorflow 2.0 preview release which has eager execution enabled by default. There is a disable_eager_execution()
in v1 API, which you can put in the front of your code like:
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
On the other hand, if you are not using 2.0 preview, please check if you accidentally enabled eager execution somewhere.