neural-modular
Simple codebase for flexible neural net training.
Allows for seamless exchange of models, dataset, and optimizers.
Uses hydra for config-building and logging.
Option to enable wandb for run-tracking and cloud-storage.
Run python main.py to train your model.
Understanding the Code
-
main.pyis the main entry point -
conf/config.yamlis the default config in standard Hydra syntax:- by running
python main.py +experiments=blabla.yamlyou can overwrite and extend the config by whatever you put inexperiments/blabla.yaml. - alternatively you can run
python main.py +new=argto addnewto the config, orpython main.py new=argto overwrite keynew
- by running
-
using the config, we then instantiate a dataset from
neural.datasetsand a model fromneural.models -
model and dataset are then given to the trainer
neural.train.Trainerwhich further instantiates optimizers, schedulers, and the losses -
we then train the model to convergence and checkpoint the final model
-
see
neural.utils.restorefor how to restore a model/trainer instance