https://github.com/dsergiu/pytorch-lightning-beginner
Showcase different Machine Learning Techniques using Pytorch Lightning.
https://github.com/dsergiu/pytorch-lightning-beginner
pytorch pytorch-lightning pytorch-lightning-tutorial
Last synced: 28 days ago
JSON representation
Showcase different Machine Learning Techniques using Pytorch Lightning.
- Host: GitHub
- URL: https://github.com/dsergiu/pytorch-lightning-beginner
- Owner: DSergiu
- License: mit
- Created: 2020-09-06T16:27:08.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-29T21:45:30.000Z (over 3 years ago)
- Last Synced: 2025-01-29T14:16:16.404Z (over 1 year ago)
- Topics: pytorch, pytorch-lightning, pytorch-lightning-tutorial
- Language: Jupyter Notebook
- Homepage:
- Size: 2.01 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Pytorch Lightning Beginner
Showcase different ML techniques using Pytorch Lightning inspired by [pytorch-beginner](https://github.com/L1aoXingyu/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.
## How to use?
1. Clone repo
* `git clone https://github.com/DSergiu/pytorch-lightning-beginner`
* `cd pytorch-lightning-beginner`
2. Create and activate virtual env
* `python3 -m venv venv && ./venv/Scripts/activate`
3. Install dependencies
* `pip install -r requirements.txt`
4. Start jupyter notebook
* `jupyter notebook`
5. Open a notebook chapter and experiment (e.g. )
* e.g. open `01-Linear-Regression/Notebook.ipynb`
## Useful training arguments
When training you can experiment with following arguments. For a full list see [Pytorch Lightning Trainer](https://pytorch-lightning.readthedocs.io/en/latest/common/trainer.html).
| 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 |
## Prerequisites
You must be familiar with Python, Pytorch and Pytorch Lightning.
To understand the code please see official [Pytorch Lighning Docs](https://pytorch-lightning.readthedocs.io/en/stable/).
## Requirements
* python 3.8