Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tf.identity()
>>> import tensorflow as tf
>>> mat_a = tf.constant([[1,2],[3,4]])
>>> mat_b = tf.identity(mat_a)
>>> print(mat_b.eval())
[[1 2]
[3 4]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment