In [1]:
import tensorflow as tf

with tf.name_scope("Square_of_10_plus_11"):
    x1 = tf.constant(10)
    x2 = tf.constant(11)
    x3 = tf.square(x1, name="x1_2")
    x4 = tf.square(x2, name="x2_2")
    x5 = tf.multiply(x1,x2, name="x1x2")
    x6 = tf.multiply(x5,2, name="2x1x2")
    x7 = tf.add(x3,x4, name="x1_2_plus_x2")
    x8 = tf.add(x7,x6, name="x1_2_plus_x2_2_plus_2x1x2")
   
with tf.Session() as sess:
    writer = tf.summary.FileWriter("/tmp/tboard/output20_c1", sess.graph)
    print(sess.run(x8))
    writer.close()


441

In [ ]: