'How to obtain perception loss from Keras Autoencoder in Python?
I'm following the MNIST tutorial here to build an autoencoder: https://blog.keras.io/building-autoencoders-in-keras.html
Now that I've successfully finished training and building the autoencoder model, I'd now like to feed it a sample picture and obtain the perception loss from keras of how this image relates to the decoded image i.e. how different is this sample image from the reconstructed model image.
What do I run after this code to be able to do that comparison?
autoencoder.fit(x_train, x_train,
epochs=100,
batch_size=256,
shuffle=True,
validation_data=(x_test, x_test))
The additional context here is that if an image has certain perception loss values I'd like to use that information to flag the image as being anomalous. In this case it would mean a hand-drawn digit 0-9 is too illegible.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

