Guest User

Untitled

a guest
Jan 16th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. import tensorflow as tf
  2.  
  3. a = tf.constant(5, name="input_a")
  4. b = tf.constant(3, name="input_b")
  5. c = tf.add(a,b, name="add_c")
  6. d = tf.multiply(a,b, name="multiply_d")
  7. e = tf.add(c,d, name="add_e")
  8.  
  9. sess = tf.Session()
  10. output = sess.run(e)
  11.  
  12. # Uncomment the preeceing code to get a sneak peak at tensorboard
  13. # writer = tf.train.SummaryWriter('./my_graph', sess.graph)
  14. # writer.close()
  15. # sess.close()
  16.  
  17. # Now before you run the code go to your terminal and type in the following command
  18. # making sure that your present working directory is the same as where you ran your Python code
  19. # Command: tensorboard --logdir="my_graph"
Add Comment
Please, Sign In to add comment