fujiyuu75
4/24/2017 - 4:19 AM

tensorflow_constant.py

import tensorflow as tf

num1 = tf.constant(1)
num2 = tf.constant(2)
num3 = tf.constant(3)

sum = tf.add(num1, num2)
total = tf.add(sum,num3)

sess = tf.Session()
result = sess.run(total)
print(result) # 6