Skip to content

About the loss function of the model #1

Answered by tvhahn
Foxyrep asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the compliment! I'm glad it helped.

We use the latent_loss (line 129 in [17]) by using the Keras add_loss method (line 138 in [17]). There is a good explanation of why Keras has this "add_loss" method in this stackoverflow post: https://stackoverflow.com/a/52683522/9214620.

Aurélien Geron has an easier to understand implementation of a VAE in his Jupyter notebook. It's worth looking at. His explanation in the book is good too. https://github.com/ageron/handson-ml2/blob/master/17_autoencoders_and_gans.ipynb

Let me know if you have any other questions. Cheers!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Foxyrep
Comment options

Answer selected by tvhahn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants