Last active
January 17, 2018 17:16
-
-
Save scmmishra/df5fdb9eec8a7d598546163b41bd4420 to your computer and use it in GitHub Desktop.
Tensorflow Guide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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