A simple, flexible, and modular pytorch template for your deep learning projects. There are multiple templates available for different kinds of machine learning tasks. Switch to the appropriate branch from above and see the installation section to download the template:
- Supervised Learning (SL)
- Reinforcement Learning (RL)
- Clone the repository and go to the project folder.
git clone https://github.com/ramanakshay/canvas --depth 1 --branch sl
cd canvas
- Reset git history.
rm -rf .git
git init
git add --all
git commit -m “initial canvas commit”
- Install dependencies from requirements file. Make sure to create a virtual/conda environment before running this command.
pip install -r requirements.txt
- Test the code.
python main.py
- pytorch (An open source deep learning platform)
- hydra (A framework for configuring complex applications)
├── model - this folder contains all code (networks, layers) of the model
│ ├── weights
│ ├── classifier.py
│ ├── network.py
│ └── layers.py
│
├── data - this folder contains code relevant to the data and datasets
│ ├── datasets
│ └── data_loader.py
│
├── algorithm - this folder contains different algorithms of your project
│ ├── train.py
│ └── test.py
│
│
├── config
│ └── config.yaml - YAML config file for project
│
│
├── utils - this (optional) folder contains utilities of your project
│ └── utils.py
│
│
└── main.py - entry point of the project
The main idea behind this template is to model all machine learning tasks as interactions between an agent/model with its environment or external data. All components of the template are built around this core idea. This architecture is inspired from the agent-environment interface in reinforcement learning.
- Support for loggers
Any kind of enhancement or contribution is welcomed.
This project is licensed under the MIT License. See LICENSE for more details.