Last active
July 26, 2018 04:26
-
-
Save Ouwen/66326b796311f0cca3c60067b9237124 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 | |
g1 = tf.Graph() | |
with g1.as_default(): | |
my_input = tf.constant([-1,0,1], dtype=tf.float16, name="input") | |
# Add a print operation in between our "input" operation and "A" operation | |
my_printed_input = tf.Print(my_input, [], message="Running the graph.", name="print") | |
a = tf.square(my_printed_input, name="A") | |
b = tf.cos(a, name="B") | |
c = tf.sin(a, name="C") | |
d = tf.add(b, c, name="D") | |
e = tf.floor(b, name="E") | |
f = tf.sqrt(d, name="F") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment