Skip to content

A template for deep learning projects, designed for PyTorch and PyTorch Lightning users

License

Notifications You must be signed in to change notification settings

martinwhl/deep-learning-project-template

Repository files navigation

deep-learning-project-template

GitHub stars issues License Maintenance Code style: black Codefactor

This is a deep learning project template designed for PyTorch and PyTorch Lightning users.

How to use this template

  1. Run the following commands...
pip install -r requirements-dev.txt
git init
pre-commit install  # automatically format and do style check when committing
  1. 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.

Requirements

  • 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

About

A template for deep learning projects, designed for PyTorch and PyTorch Lightning users

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages