Created
May 7, 2018 03:40
-
-
Save hackintoshrao/efe49ae78eff1cd41de5875926decd0a to your computer and use it in GitHub Desktop.
Basics of tensorflow
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 | |
# You can create constants in TF to hold specific values | |
a = tf.constant(1) | |
b = tf.constant(2) | |
A = tf.constant(1234) | |
# B is a 1-dimensional int32 tensor | |
B = tf.constant([123,456,789]) | |
# C is a 2-dimensional int32 tensor | |
C = tf.constant([ [123,456,789], [222,333,444] ]) | |
# Adding and multiplying the constants | |
c = a + b | |
d = a * b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment