This is a deep learning project template designed for PyTorch and PyTorch Lightning users.
- Run the following commands...
pip install -r requirements-dev.txt
git init
pre-commit install # automatically format and do style check when committing
- Start coding!
The files and directories are organized as follows:
- data
|- ... # put your data here, do not include large files in git
- models
|- ... # models should be `torch.nn.Module`
- tasks
|- ... # tasks should be a framework or a system inherited from `pl.LightningModule`
- utils
|- callbacks # put your custom PyTorch Lightning callbacks here
|- data # put `torch.utils.data.Dataset` and `pl.LightningDataModule` subclasses here
|- metrics # put your custom metrics here, it is recommended to inherit from `torchmetrics.Metric`
An MLP classifier and an MNIST data module are already implemented as examples. Replace them with your custom tasks/models/data modules.
- torch
- torchvision (if you want to run the MNIST example, otherwise unnecessary)
- pytorch-lightning>=1.3.0
- torchmetrics>=0.3.0
- pre-commit
- black
- flake8