Created
November 8, 2016 05:48
-
-
Save BinRoot/5e30cb2c26ed6a50d5a8ed78d7890cda to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# Define a matrix and negate it | |
matrix = tf.constant([[1., 2.]]) | |
negMatrix = tf.neg(matrix) | |
# Start the session with a special config passed into the constructor to enable logging | |
with tf.Session(config=tf.ConfigProto(log_device_placement=True)) as sess: | |
# Evaluate negMatrix | |
result = sess.run(negMatrix) | |
# Print the resulting value | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment