pytorch-vqvae icon indicating copy to clipboard operation
pytorch-vqvae copied to clipboard

Question ragarding z_q_x_st and z_q_x of class VectorQuantizedVAE in modules.py

Open RipeMangoBox opened this issue 1 year ago • 1 comments

Thanks for your great work! I can't figure out the difference between variable (z_ q_ x_ st) and variable (z_q_x) in forward() of class VectorQuantizedVAE. image

I debug the code but find that both (z_q_x_st) and (z_q_x) need gradient and (z_q_x_st == z_q_x) check is always true. Does anyone know their difference?

RipeMangoBox avatar May 08 '24 06:05 RipeMangoBox

By the way, according to paper Neural Discrete Representation Learning, it's better to change x_tilde as following if there is no difference between (z_q_x_st) and (z_q_x): image

RipeMangoBox avatar May 10 '24 12:05 RipeMangoBox