Yet another template for PyTorch projects Highly customizable, modularized code
Python 3
PyTorch
pyyaml, addict (for configuration)
wandb
(for visualizing training runs)
Run cd src && python train.py
for sample training.
For custom use, modify the following files:
src/dataset.py
... for custom Dataset and collate function for DataLoadersrc/model.py
... for custom Modulesrc/optimization.py
... for custom loss function and optimizersrc/evaluator.py
... for custom evaluator (used for validation)
Then, put in configurations (hyperparameters, ...) into cfg/hogehoge.yml
Sample configuration file is in cfg/sample.yml
train.py --config path/to/configuration/file.yml
train.py --config path/to/configuration/file.yml --resume