Skip to content

Instantly share code, notes, and snippets.

@AFAgarap
Created March 16, 2019 07:11
Show Gist options
  • Save AFAgarap/73f2b685f5513ddffc1c54499cd45d45 to your computer and use it in GitHub Desktop.
Save AFAgarap/73f2b685f5513ddffc1c54499cd45d45 to your computer and use it in GitHub Desktop.
Reconstruction error function for a vanilla autoencoder.
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