rosinality / vq-vae-2-pytorch

Implementation of Generating Diverse High-Fidelity Images with VQ-VAE-2 in PyTorch
Other
1.59k stars 271 forks source link

train hierarchical vq-vae #38

Open mahmud1006 opened 4 years ago

mahmud1006 commented 4 years ago

@rosinality , thanks for sharing the code. It really helps me a lots. I am confused whether it is a vanila vqvae. I found no 'top' ,'bottom' hierarchy in 'train_vqvae.py'. would please share how did you manage to train hierarchical vq-vae in your code.

according to paper Generating Diverse High-Fidelity Images with VQ-VAE-2 "we train a hierarchical VQ-VAE to encode images onto a discrete latent space, and then we fit a powerful PixelCNN prior over the discrete latent space induced by all the data." https://arxiv.org/pdf/1906.00446.pdf

rosinality commented 4 years ago

This implementation implementa hierarchical vq-vae. It is in model implementations. https://github.com/rosinality/vq-vae-2-pytorch/blob/4d2dbc0e073f033675843225dd7436550f9d6a47/vqvae.py#L164

mahmud1006 commented 4 years ago

I got it. Thank you so much for the quick reply.