Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MNIST GAN

A PyTorch implementation of a Generative Adversarial Network (GAN) trained on the MNIST dataset. Have a fun with it here

Overview

This project implements a GAN to generate handwritten digits similar to those in the MNIST dataset. The architecture includes:

  • A Generator that creates fake images from random noise
  • A Discriminator that tries to distinguish between real and fake images
Screenshot 2025-02-04 at 17 00 53 Screenshot 2025-02-04 at 16 57 37

Requirements

torch>=2.0.0
torchvision>=0.15.0
matplotlib>=3.5.0
tqdm>=4.65.0

Quick Start

  1. Clone the repository:
git clone https://github.com/tveshas/mnist-gan.git
cd mnist-gan
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the training:
python my_gan.py

Project Structure

  • my_gan.py: Main implementation file containing GAN architecture and training loop
  • my_gan.ipynb: Jupyter notebook version with visualizations and explanations

Architecture Details

  • Generator: Multi-layer perceptron with batch normalization and ReLU activation
  • Discriminator: Multi-layer perceptron with LeakyReLU activation
  • Input dimension: 784 (28x28 MNIST images)
  • Latent dimension: 64

License

MIT License

Acknowledgments

This implementation is based on the original GAN paper by Goodfellow et al.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages