Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tensorflow Guide
import tensorflow as tf
a = tf.constant(5, name="input_a")
b = tf.constant(3, name="input_b")
c = tf.add(a,b, name="add_c")
d = tf.multiply(a,b, name="multiply_d")
e = tf.add(c,d, name="add_e")
sess = tf.Session()
output = sess.run(e)
# Uncomment the preeceing code to get a sneak peak at tensorboard
# writer = tf.summary.FileWriter('./my_graph', sess.graph)
# writer.close()
# sess.close()
# Now before you run the code go to your terminal and type in the following command
# making sure that your present working directory is the same as where you ran your Python code
# Command: tensorboard --logdir="my_graph"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment