Showcase different ML techniques using Pytorch Lightning inspired by pytorch-beginner.
The repository is split into chapters
starting with basic linear regression and ending with more complex networks (e.g. RNNs, GANs).
There is a jupyter notebook within each chapter where one can experiment on training and usage of the trained models.
- Clone repo
git clone https://github.com/DSergiu/pytorch-lightning-beginner
cd pytorch-lightning-beginner
- Create and activate virtual env
python3 -m venv venv && ./venv/Scripts/activate
- Install dependencies
pip install -r requirements.txt
- Start jupyter notebook
jupyter notebook
- Open a notebook chapter and experiment (e.g. )
- e.g. open
01-Linear-Regression/Notebook.ipynb
- e.g. open
When training you can experiment with following arguments. For a full list see Pytorch Lightning Trainer.
Argument | Description |
---|---|
--help |
see list of arguments |
--fast_dev_run=True |
fast run of training |
--max_epochs=20 |
run 20 epochs of training data set |
--accelerator=cuda |
train on cuda GPU |
--devices=2 |
train using 2 devices |
--deterministic=True |
training always produces same output given same input |
You must be familiar with Python, Pytorch and Pytorch Lightning.
To understand the code please see official Pytorch Lighning Docs.
- python 3.8