Implementing Variational Auto Encoder from Scratch in Pytorch

preview_player
Показать описание
In this video we look at how to go about implementing VAE in pytorch from scratch using the MNIST dataset.
I also provide the repo link below where one can play with different aspects of implementation and see how it impact the generation result as well visualize latent space, generated image manifold and interpolation.
#vae #machinelearning #deeplearning

Useful Links
KL Divergence of Gaussians
1. The Kullback-Leibler divergence between Gaussians -
3. KL Divergence between 2 Gaussian Distributions -

Background Track Fruits of Life by Jimena Contreras
Github Repo Link
Рекомендации по теме
Комментарии
Автор

During your training, why does it show KL divergence loss to be increasing? Shouldn't it decrease similar to reconstruction loss?

anand
Автор

When you calculated KL Loss, why did you use dim=-1, why torch.mean() after torch.sum()? Can you provide links of simplified KL Div that you did please?

Btw, awesome series. I might have some doubts here and there.

prateekpani
Автор

Hi, i have two questions: Shouldn't the decoder_fcs have a final nn.Tanh() layer so that the output (-1, 1) matches the way the images are rescaled (-1, 1)? Another question I have is, how are we supposed to generate new data points? Should we need to feed the network and get the mean and log and generate vector z, or could we just navigate through vectors of the same shape as z and expect to get something?
Thank you!!

gmovec
Автор

Hi sir, when i am trying to run these code of run_simple_vae.py i am getting the error ValueError: num_samples should be a positive integer value, but got num_samples=0 i am following the readme from github repository but i dont know from where this error is coming ..maybe it is not expecting the dataset in csv format.. please help

pratyanshvaibhav
Автор

Why the final layer of mean/logvar is 2 dimensional but not 1

ivanmateev
Автор

Hi sir,
I have  scanning electron microscope images which has some defects in it or some part of pattern is missing while printing on wafer. How can we use VAE to classify a sem image into fault and faultless category?
Please guide me.

androidtech
welcome to shbcf.ru