Skip to content

Instantly share code, notes, and snippets.

@nithyadurai87
Created July 16, 2019 16:16
import tensorflow as tf
x1 = tf.get_variable("a", dtype=tf.int32, initializer=tf.constant([5]))
y1 = tf.get_variable("b", dtype=tf.int32, initializer=tf.constant([6]))
c = tf.constant([5], name ="c")
f = tf.multiply(x1, y1) + tf.pow(x1, 2) + y1 + c
with tf.Session() as s:
summary_writer = tf.summary.FileWriter('tensorboard_example',s.graph)
s.run(tf.global_variables_initializer())
print (s.run(f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment