Many of us are aware of Discriminative models, which generally focus on predicting data labels. In contrast, Generative Models help generate output very similar to the input data.
For example, we have data related to cars that can be used to classify them, but Generative models can learn the data's patterns and generate car features completely different from the input data.
In this project, we introduce Generative Models, use the PyTorch framework to build Autoencoders on the MNIST dataset, and learn how to use Autoencoders as Generative Models to generate new images of digits.
- Language: Python
- Libraries: torch, torchvision, torchinfo, numpy, matplotlib
- Introduction to Generative Models
- Introduction to Autoencoders
- Building Autoencoders in PyTorch
- Model training on Google Colab
- Building Generative Models using Autoencoders
data
: Containsdata_utils.py
, used to download and transform the data.model
: Containsautoencoder_decoder_model.py
and the Colab notebook.train.py
: Contains the code for model training.run.py
: The main file in which all functions are called.requirements.txt
: Lists all the required libraries with respective versions. Install them usingpip install -r requirements.txt
. Note: Please use CUDA versions of torch if CUDA is available.