Skip to content

Instantly share code, notes, and snippets.

@semihyagcioglu
Created April 28, 2017 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save semihyagcioglu/7bba93a225909dd9939925c48f581a45 to your computer and use it in GitHub Desktop.
Save semihyagcioglu/7bba93a225909dd9939925c48f581a45 to your computer and use it in GitHub Desktop.
import tensorflow as tf
tf.__version__
# Creates a graph.
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
# Creates a session with log_device_placement set to True.
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
# Runs the op.
print(sess.run(c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment