Skip to content

Simple modular codebase that makes it easy to plug in new datasets, models, or configs while keeping track of experiments.

Notifications You must be signed in to change notification settings

jlko/neural-modular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

neural-modular

Info

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.

Setup

Run

conda env update -f envs/environment.yaml
cona activate neural

to install and activate the conda environent.

Understanding the Code

  • main.py is the main entry point

  • conf/config.yaml is the default config in standard Hydra syntax:

    • by running python main.py +experiments=blabla you can overwrite and extend the config by whatever you put in experiments/blabla.yaml.
    • alternatively you can run python main.py +new=arg to add new to the config, or python main.py new=arg to overwrite key new
  • using the config, we then instantiate a dataset from neural.datasets and a model from neural.models

  • model and dataset are then given to the trainer neural.train.Trainer which further instantiates optimizers, schedulers, and the losses

  • we then train the model to convergence and checkpoint the final model

  • see neural.utils.restore for how to restore a model/trainer instance

About

Simple modular codebase that makes it easy to plug in new datasets, models, or configs while keeping track of experiments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages