Created
January 11, 2019 13:49
-
-
Save darthdeus/7e4fe18bbf9efd8e635b3504936298b0 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 | |
tf.reset_default_graph() | |
input = tf.placeholder(dtype=tf.float32, shape=None) | |
def encoder(x): | |
return x*x | |
def decoder(x): | |
return x - 3 | |
z = encoder(input) | |
output = decoder(z) | |
with tf.Session() as sess: | |
print(sess.run(output, {input: 3})) | |
print(sess.run(output, {z: 3})) | |
print(sess.run([output, z], {input: 3})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment