Last active
September 17, 2017 13:29
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 | |
import numpy as np | |
# phase 1: define computation graph f | |
pi = tf.constant(np.pi) | |
one = tf.constant(1.) | |
# both one and pi must be of same datatype | |
f = tf.add(pi,one) | |
# phase 2: execute computation graph f | |
with tf.Session() as sess: | |
print sess.run(f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment