tf.compat.v1.disable_eager_execution()
x = tf.compat.v1.placeholder(tf.float32)
y = tf.matmul(x, x)
sess = tf.compat.v1.Session()
print(sess.run(y)) # ERROR: will fail because x was not fed.
rand_array = np.random.rand(1024, 1024)
print(sess.run(y, feed_dict={x: rand_array})) # Will succeed.
Watch video Tensorflow: 12 Variables and Placeholders online without registration, duration hours minute second in high quality. This video was added by user BharatOnlineDS 30 September 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 468 once and liked it 8 people.