pytorch-vqvae
pytorch-vqvae copied to clipboard
Question ragarding z_q_x_st and z_q_x of class VectorQuantizedVAE in modules.py
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.
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?
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):