In [1]:
import tensorflow as tf

a=tf.constant(2)
b=tf.constant(3)


c=tf.square(a)
d=tf.square(b)
e=tf.add(c,d)
f=tf.multiply(a,b)
g=tf.multiply(f,2)
h=tf.subtract(e,g)

sess=tf.Session()
print(sess.run(h))
writer = tf.summary.FileWriter("/tmp/tboard/output2", sess.graph)


1

In [2]:
import tensorflow as tf

a=tf.constant(2)
b=tf.constant(3)

y=tf.add(a,b)


c=tf.square(a)
d=tf.square(b)
e=tf.add(c,d)
f=tf.multiply(a,b)
g=tf.subtract(e,f)

res=tf.multiply(y,g)

sess=tf.Session()
print(sess.run(res))
writer = tf.summary.FileWriter("/tmp/tboard/output3", sess.graph)


35

In [ ]:


In [ ]: