Skip to content

Instantly share code, notes, and snippets.

@abomm
Created November 12, 2016 18:30
Show Gist options
  • Save abomm/ce5b1ba08c93f7bdcbd05b24945fd928 to your computer and use it in GitHub Desktop.
Save abomm/ce5b1ba08c93f7bdcbd05b24945fd928 to your computer and use it in GitHub Desktop.
import tensorflow as tf
# a = tf.constant([3,2], name="a", dtype=tf.float32)
# b = tf.constant([3,2], shape=[2,1], name="b")
# c = tf.constant([[3.0], [2.0]], name="c")
a = tf.constant([3], name="a")
b = tf.constant([5], name="b")
c = tf.add(a,b,name="c")
print(c)
# tf.reset_default_graph()
graph = tf.get_default_graph() #.as_graph_def()
summary_writer = tf.train.SummaryWriter('/tmp/tensorboard', graph)
summary_writer.flush()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment