Skip to content

Instantly share code, notes, and snippets.

@nithyadurai87
Last active December 12, 2019 14:55
Show Gist options
  • Save nithyadurai87/d7ede47ace7ce9028342f8153b81c9b3 to your computer and use it in GitHub Desktop.
Save nithyadurai87/d7ede47ace7ce9028342f8153b81c9b3 to your computer and use it in GitHub Desktop.
import tensorflow as tf
print (tf.constant("hello world!"))
print (tf.constant(1))
print (tf.constant(1, tf.int16))
print (tf.constant(1.25))
print (tf.constant([1,2,3]))
print (tf.constant([[1,2,3],[4,5,6]]))
print (tf.constant([[[1,2,3],[4,5,6]],
[[7,8,9],[10,11,12]],
[[13,14,15],[16,17,18]]]))
print (tf.constant([True, True, False]))
print (tf.zeros(10))
print (tf.ones([10, 10]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment