In [6]:
import tensorflow as tf
tf.reset_default_graph()
x=int(input())
y=int(input())
with tf.name_scope("Split"):
with tf.name_scope("a3"):
a = tf.multiply(x,x)
b = tf.multiply(x,a)
with tf.name_scope("b3"):
c = tf.multiply(y,y)
d = tf.multiply(y,c)
with tf.name_scope("3ab"):
e = tf.multiply(x,y)
k = 3
f = tf.multiply(k,c)
g = tf.add(x,y)
h = tf.multiply(f,g)
with tf.name_scope("final"):
i = tf.add(b,d)
j = tf.add(i,h)
with tf.Session() as sess:
writer = tf.summary.FileWriter("/tmp/tboard/output_2", sess.graph)
print(sess.run(j))
writer.close()
In [ ]: