Skip to content

Instantly share code, notes, and snippets.

@savan77
Last active January 11, 2017 09:39
Show Gist options
  • Select an option

  • Save savan77/66e9e97bd5d70a196a69002ed6ca39a4 to your computer and use it in GitHub Desktop.

Select an option

Save savan77/66e9e97bd5d70a196a69002ed6ca39a4 to your computer and use it in GitHub Desktop.
import tensorflow as tf
#create a variable
#Synatx - tf.Variable(<initial-value>, name="")
x = tf.Variable(3, name="x")
y = tf.Variable(4, name="y")
#add x,y
c = tf.add(x,y)
init = tf.global_variables_initializer()
sess = tf.Session()
sess.run(init)
result = sess.run(c)
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment