Last active
December 12, 2019 14:54
-
-
Save nithyadurai87/495e2484a602abc85d3e53ed7ace7407 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
| import tensorflow as tf | |
| import numpy as np | |
| x = tf.placeholder(tf.float32,name="x") | |
| y = tf.placeholder(tf.float32,[1],name="y") | |
| z = tf.constant(2.0) | |
| y = x * z | |
| print (x) | |
| with tf.Session() as s: | |
| print (s.run(y,feed_dict={x:[100]})) | |
| print (s.run(y,{x:[200]})) | |
| print (s.run(y,{x: np.random.rand(1, 10)})) | |
| print (s.run(tf.pow(x, 2),{x:[300]})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment