Skip to content

Instantly share code, notes, and snippets.

@rohitfarmer
Created November 2, 2018 16:18
Show Gist options
  • Select an option

  • Save rohitfarmer/eb5bd1343414cb7b67625fb9da569de4 to your computer and use it in GitHub Desktop.

Select an option

Save rohitfarmer/eb5bd1343414cb7b67625fb9da569de4 to your computer and use it in GitHub Desktop.
Cheat sheet for tensorflow

Using Tensor Board

import tensorflow as tf

a = tf.constant(2, name='a')
b = tf.constant(3, name='b')
x = tf.add(a,b, name='add')

writer = tf.summary.FileWriter('./graphs', tf.get_default_graph())
with tf.Session() as sess:
	print(sess.run(x))
writer.close()

tensorboard --logdir="./graphs" --port 6006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment