Last active
June 22, 2020 02:36
-
-
Save irdanish11/ea95b7e0bf3f2cf20009317bd40bfe81 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tf.compat.v1.disable_eager_execution() # need to disable eager in TF2.x | |
| x = tf.compat.v1.placeholder(tf.float32, shape=(1024, 1024)) | |
| y = tf.matmul(x, x) | |
| with tf.compat.v1.Session() as sess: | |
| rand_array = np.random.rand(1024, 1024) | |
| print(sess.run(y, feed_dict={x: rand_array})) # Will succeed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment