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.
- 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.
- Make sure you have Python and the requirements installed.
To install all requirements, runpip install -r requirements.txt - (Optional) Change configs and hyperparameters in
trainer.py. - Run the trainer:
python trainer.py - The trained module will be saved in
/Exps.
app.py
- Set the correct checkpoint and model directory in
app.py - Run the web UI:
python app.py - Open your browser and navigate to
http://127.0.0.1:8000to draw digits and see the model's predictions.
server.py
- Set the correct checkpoint and model directory in
server.py - Start the web server:
python server.py - Open your browser and navigate to
http://127.0.0.1:8000to draw digits and see the model's predictions.