In [2]:
import tensorflow as tf

a = tf.constant(3, name='a')

In [2]:
a


Out[2]:
<tf.Tensor 'a:0' shape=() dtype=int32>

In [3]:
with tf.Session() as session:
    print(session.run(a))


3

In [4]:
a = tf.constant(3, name='a')
a = tf.constant(3, name='b')

In [5]:
with tf.Session() as session:
    print(session.run(a))


3

In [6]:
with tf.Session() as session:
    print(session.run(b))


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-6-45e6c8a5bb82> in <module>()
      1 with tf.Session() as session:
----> 2     print(session.run(b))

NameError: name 'b' is not defined

In [7]:
a


Out[7]:
<tf.Tensor 'b:0' shape=() dtype=int32>

In [4]:
a = tf.constant(3, name='a')
b = tf.constant(3, name='b')

In [9]:
sum = a+b

In [10]:
with tf.Session() as session:
    print(session.run(sum))


6

In [12]:
a = tf.constant([1, 2, 3], name='a')
b = tf.constant([2, 3, 4], name='b')
sum = a+b

with tf.Session() as session:
    print(session.run(sum))


[3 5 7]

In [13]:
a = tf.constant([1, 2, 3], name='a')
b = tf.constant(100, name='b')
sum = a+b

with tf.Session() as session:
    print(session.run(sum))


[101 102 103]

In [20]:
a = tf.constant([[1, 2, 3], [1, 2, 3]], name='a')
b = tf.constant([[12], [14]], name='b')
sum = a+b

with tf.Session() as session:
    print(session.run(sum))


[[13 14 15]
 [15 16 17]]

In [3]:
points = tf.transpose(tf.pack([point1, point2]))


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-3-3e4057df28db> in <module>()
----> 1 points = tf.transpose(tf.pack([point1, point2]))

NameError: name 'point1' is not defined

In [ ]: