Skip to content

jackmcintire/genmnist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GenMnist

Mnist, but backward. Lol. Instead of classifying digits, the model is trained to generate images from an input digit between 1-9.

Data

Calling loader.load() should just work. First it will download the imgs.zip.

Model Architecture

The model is a dumb little MLP with these layers:

  • Input Layer: One-hot encoded representation of the digit (dimension: 10).
  • Hidden Layer: 128 neurons with ReLU activation.
  • Output Layer: A flattened representation of the MNIST image (dimension: 784).

Usage

  1. Instantiate the model:
model = Model()
  1. Train the model:
model.train()
  1. Generate images for a list of digits or one digit:
model.generate(list(range(10)))
model.generate(4)

Visualization

Generated images are visualized in a grid. Definitely room for improvement but not back for a ~2s training loop.

Alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published