Skip to content

Instantly share code, notes, and snippets.

@nithyadurai87
Last active December 12, 2019 14:54
Show Gist options
  • Save nithyadurai87/811fb2f2d2871420f097c5c99c659f9b to your computer and use it in GitHub Desktop.
Save nithyadurai87/811fb2f2d2871420f097c5c99c659f9b to your computer and use it in GitHub Desktop.
import tensorflow as tf
a = tf.constant(121.5)
b = tf.constant([[1,2],[3,4],[5,6]])
c = tf.constant([[7,8],[9,10],[11,12]])
r1 = tf.sqrt(a)
r2 = tf.add(b,c)
r3 = tf.multiply(b,c)
with tf.Session() as s:
print (s.run(r1))
print (s.run(r2))
print (s.run(r3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment