Created
December 9, 2017 12:49
-
-
Save krunal3kapadiya/4c066dd86f5ec5d35deed8c698bf3d80 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
from __future__ import print_function | |
import tensorflow as tf | |
# Basic constant operations | |
a = tf.constant(2) | |
b = tf.constant(4) | |
# Launch the default graph. | |
with tf.Session() as sess: | |
print("a=2, b=4") | |
print("Addition with constants: %i" % sess.run(a+b)) | |
print("Multiplication with constants: %i" % sess.run(a*b)) | |
print("Substraction with constants: %i" % sess.run(b-a)) | |
print("Division with constants: %i" % sess.run(b/a)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment