Created
November 8, 2016 05:46
-
-
Save BinRoot/b6038cfb9018246546a7091215d0fcb1 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 an arbitrary matrix | |
matrix = tf.constant([[1., 2.]]) | |
# Run the negation operator on it | |
neg_matrix = tf.neg(matrix) | |
# Start a session to be able to run operations | |
with tf.Session() as sess: | |
# Tell the session to evaluate negMatrix | |
result = sess.run(neg_matrix) | |
# Print the resulting matrix | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment