Created
November 3, 2016 14:40
-
-
Save BinRoot/88555efe1b67ad59b3cd44c464e58707 to your computer and use it in GitHub Desktop.
This file contains 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 2x1 matrix | |
matrix1 = tf.constant([[1., 2.]]) | |
# Define a 1x2 matrix | |
matrix2 = tf.constant([[1], | |
[2]]) | |
# Define a rank 3 tensor | |
myTensor = tf.constant([ [[1,2], | |
[3,4], | |
[5,6]], | |
[[7,8], | |
[9,10], | |
[11,12]] ]) | |
# Try printing the tensors | |
print(matrix1) | |
print(matrix2) | |
print(myTensor) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment