Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 2.44 KB

README.md

File metadata and controls

58 lines (44 loc) · 2.44 KB

Pytorch Lightning Beginner

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.

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.

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.

Requirements

  • python 3.8