Created
March 16, 2019 07:11
-
-
Save AFAgarap/73f2b685f5513ddffc1c54499cd45d45 to your computer and use it in GitHub Desktop.
Reconstruction error function for a vanilla autoencoder.
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
def loss(model, original): | |
reconstruction_error = tf.reduce_mean(tf.square(tf.subtract(model(original), original))) | |
return reconstruction_error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment