Skip to content

ycgmjc/MNIST-trainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNIST Trainer

This is a simple Neural Network trainer that utilizes the MNIST Dataset.

It includes a simple Gradio based, and FastAPI based web interfaces to check the trained model.

Description

  • Loader.py: Responsible for loading in the MNIST dataset and preparing it for training.
  • Models.py: Holds Neural Network models to use for training.
  • trainer.py: The actual trainer used to train the neural network.
  • app.py: A Gradio based web app to check a trained model's validity.
  • server.py: A FastAPI based web interface to check a trained model's validity.
  • requirements.txt: The requirements for running the trainer.
  • /Exps: The directory where each training result is saved.
  • /dataset: The directory where the MNIST dataset should be in.
  • /static: The directory containing the frontend web file (i.e. index.html) for the drawing interface.

How to use

Training

  1. Make sure you have Python and the requirements installed.
    To install all requirements, run pip install -r requirements.txt
  2. (Optional) Change configs and hyperparameters in trainer.py.
  3. Run the trainer: python trainer.py
  4. The trained module will be saved in /Exps.

Testing

app.py
  1. Set the correct checkpoint and model directory in app.py
  2. Run the web UI: python app.py
  3. Open your browser and navigate to http://127.0.0.1:8000 to draw digits and see the model's predictions.
server.py
  1. Set the correct checkpoint and model directory in server.py
  2. Start the web server: python server.py
  3. Open your browser and navigate to http://127.0.0.1:8000 to draw digits and see the model's predictions.

About

A simple Neural Network trainer that trains with the MNIST dataset, with interface to check the trained models.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors