In [3]:
import tensorflow as tf
hello = tf.constant("hello Tensorflow!")
sess = tf.Session()

In [4]:
print(sess.run(hello))


b'hello Tensorflow!'

In [7]:
x=1
y=x+9
print(y)
x = tf.constant(1, name='x')
y = tf.Variable(x+9, name='y')

print(y)


10
<tensorflow.python.ops.variables.Variable object at 0x10fdb9d30>

In [8]:
model = tf.initialize_all_variables()

with tf.Session() as sess:
    sess.run(model)
    print(sess.run(y))


10

In [9]:
a = tf.placeholder("int16")
b = tf.placeholder("int16")

y = tf.mul(a,b)

sess = tf.Session()

print(sess.run(y, feed_dict={a:2,b:5}))


10

In [ ]: