-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About the loss of VQVAE2 network #57
Comments
Codes in the |
@rosinality Thanks for your reply, it helps a lot! |
@rosinality would you think its a good idea to expose the latent loss's weight as a parameter - or d'you think |
Hi,
in the paper, total loss consists of 3 parts as follows:
However, in the codes it seems that this loss is different (as follows)
loss = recon_loss + latent_loss_weight * latent_loss
And honestly I only know that 'latent_loss' stems from the return value 'diff' of the 'Quantize.forward' in vqvae.py, which is
diff = (quantize.detach() - input).pow(2).mean()
Although this train_vqvae.py did work out on my dataset and achieved quite awesome results (thanks for your sharing by the way), I actually cannot read the process from the encoded outcome E(x) to the quantized outcome ek, nor that of the latent loss.
So I am wandering that is there any explanation?
Thanks.
The text was updated successfully, but these errors were encountered: