Created
January 9, 2019 16:28
-
-
Save d3lm/2e0521de7c0c0920683658e022d577b1 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 tf_api as tf | |
# create default graph | |
tf.Graph().as_default() | |
# construct computational graph by creating some nodes | |
a = tf.Constant(15) | |
b = tf.Constant(5) | |
prod = tf.multiply(a, b) | |
sum = tf.add(a, b) | |
res = tf.divide(prod, sum) | |
# create a session object | |
session = tf.Session() | |
# run computational graph to compute the output for 'res' | |
out = session.run(res) | |
print(out) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment