From the course: Programming Generative AI: From Variational Autoencoders to Stable Diffusion with PyTorch and Hugging Face
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Transforming an autoencoder into a VAE
From the course: Programming Generative AI: From Variational Autoencoders to Stable Diffusion with PyTorch and Hugging Face
Transforming an autoencoder into a VAE
- [Instructor] Now that we saw vanilla auto encoders in PyTorch, as well as how to represent convolutional layers in PyTorch, I wanted to put all these pieces together to build the final demonstration of this lesson, a convolutional variational auto encoder in PyTorch! Now, I'm going to start with the same auto encoder code that we saw before with simple linear layers and slowly morph this into a convolutional variational auto encoder, and then train that on the same fashion MNIST dataset. So, to turn this simple auto encoder into a convolutional auto encoder, not variational yet, we can simply replace these linear layers in our sequential module with some convolutional 2D layers. And these layers here are the same as what we saw before. We have a number of in channels. So since our input data is grayscale, we really only have one channel in. And the out channels are the number of feature maps we want to generate. Since this is an internal convolutional layer, we can really set this…
Contents
-
-
-
-
-
(Locked)
Topics54s
-
(Locked)
Representing images as tensors7m 45s
-
(Locked)
Desiderata for computer vision4m 57s
-
(Locked)
Features of convolutional neural networks7m 56s
-
(Locked)
Working with images in Python10m 20s
-
(Locked)
The Fashion-MNIST dataset4m 48s
-
(Locked)
Convolutional neural networks in PyTorch10m 43s
-
(Locked)
Components of a latent variable model (LVM)8m 57s
-
(Locked)
The humble autoencoder5m 29s
-
(Locked)
Defining an autoencoder with PyTorch5m 42s
-
(Locked)
Setting up a training loop9m 47s
-
(Locked)
Inference with an autoencoder4m 16s
-
(Locked)
Look ma, no features!8m 21s
-
(Locked)
Adding probability to autoencoders (VAE)4m 49s
-
(Locked)
Variational inference: Not just for autoencoders7m 20s
-
(Locked)
Transforming an autoencoder into a VAE13m 26s
-
(Locked)
Training a VAE with PyTorch13m 33s
-
(Locked)
Exploring latent space11m 37s
-
(Locked)
Latent space interpolation and attribute vectors12m 30s
-
(Locked)
-
-
-
-
-