Skip to content
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

small question about the vq-vae paper #221

Open
ghost opened this issue Sep 15, 2023 · 1 comment
Open

small question about the vq-vae paper #221

ghost opened this issue Sep 15, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 15, 2023

hello!
thank you for your great work!

I have a question about loss function in paper.
L = log p(x|z(x)) + ||sg[z(x)] − e|| + β||z(x) − sg[e]||

the author mentioned that a third term exists because e can grow arbitrarily if it doesn't train as fast as the encoder parameters.
but I see that term only helps the encoder to be trained faster.

will it help the e to be trained faster too? but I assume that sg[e] is meaning that the e won't be trained by the term.
I hope this isn't a silly question ;) thx in advance.

@Parisa-Boodaghi
Copy link

Hi,
you explanation is correct, the last term exist to help with optimization and loss reduction. The idea here is without the last term the error between the embedding and encoder output might grow arbitrary which is not good for us and it is because of the slow rate of embedding optimization. To solve this problem the suggest to add the third term which helps the encoder to be optimized with low rate to instead help with the loss reduction in total and compensate for the slow optimization rate of the second term which is embedding loss.
I hope this helps you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant