Skip to content

Instantly share code, notes, and snippets.

@BinRoot
Created November 3, 2016 14:43
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 BinRoot/d502415ffacb53de5d7f8148b03dcc5a to your computer and use it in GitHub Desktop.
Save BinRoot/d502415ffacb53de5d7f8148b03dcc5a to your computer and use it in GitHub Desktop.
import tensorflow as tf
# Define an arbitrary tensor
x = tf.constant([[1, 2]])
# Negate the tensor
neg_x = tf.neg(x)
# Print the object
print(neg_x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment