Fake Handwritten Digits

In this project, we will train a model that will eventually learn to write handwritten digits.

INPUT: we will use torchvision dataset that is built-in in PyTorch input

OUTPUT: generated data output

Tools Used

  • Python
  • PyTorch
  • Torchvision
  • Matplotlib

Concepts covered

  • GAN (Generative Adversarial Networks)
  • Generator
  • Discriminator
  • Leaky ReLU Activation Function


We used PyTorch built-in torchvision module as a data source which called MNIST handwritten digit. We implemented a GAN (Generative Adversarial Networks) model that implemented the Leaky ReLU activation function. We trained the Discriminator and Generator Neural Networks. The purpose of the Generator is to create fake images and the Discriminator to identify between the fake and real images. They worked together to finally generate some very realistic fake images which are hard to differentiate.

Software Engineer

Fullstack software engineer with 4+ years of experiece learing to teach machines