An open API service indexing awesome lists of open source software.

https://github.com/jmaczan/deep-learning-pytorch

Deep Learning architectures implemented in PyTorch Lightning
https://github.com/jmaczan/deep-learning-pytorch

alexnet artificial-intelligence cnn deep-learning deep-learning-algorithms deep-learning-architectures educational lenet machine-learning pytorch pytorch-lightning

Last synced: 4 months ago
JSON representation

Deep Learning architectures implemented in PyTorch Lightning

Awesome Lists containing this project

README

        

# 🌸 Deep Learning models implemented in PyTorch

PyTorch
Lightning
Config: Hydra
Template

## Description

[A collection of deep learning models implemented in PyTorch and PyTorch Lightning for educational purposes](src/models/components)

- [x] [LeNet](http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf)
- [x] [AlexNet](https://proceedings.neurips.cc/paper_files/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf) - [maczan.pl blog post](https://maczan.pl/p/alexnet-from-scratch-in-pytorch-lightning)
- [x] [VGG](https://arxiv.org/pdf/1409.1556.pdf) for ImageNet
- [ ] ResNet 📝 In progress 📚
- [ ] RNN
- [ ] LSTM
- [ ] GRU (Gated Recurrent Units)
- [ ] Inception
- [ ] DenseNet
- [ ] Transformer
- [ ] ViT
- [ ] Sequence-to-Sequence
- [x] GPT - [separate repo](https://github.com/jmaczan/gpt)
- [ ] BERT
- [ ] VAE (Variational autoencoder)
- [ ] GAN
- [ ] U-Net
- [ ] Siamese Network
- [ ] DQN
- [ ] A3C
- [ ] Neural ODEs (ordinary differential equations)
- [ ] GNN (Graph Neural Network)
- [ ] EfficientNet

## Installation

#### Pip

```bash
# clone project
git clone https://github.com/jmaczan/deep-learning-pytorch
cd deep-learning-pytorch

# [OPTIONAL] create conda environment
conda create -n deep-learning-pytorch python=3.9
conda activate deep-learning-pytorch

# install pytorch according to instructions
# https://pytorch.org/get-started/

# install requirements
pip install -r requirements.txt
```

#### Conda

```bash
# clone project
git clone https://github.com/jmaczan/deep-learning-pytorch
cd deep-learning-pytorch

# create conda environment and install dependencies
conda env create -f environment.yaml -n deep-learning-pytorch

# activate conda environment
conda activate deep-learning-pytorch
```

## How to run

Train model with default configuration

```bash
# train on CPU
python src/train.py trainer=cpu

# train on GPU
python src/train.py trainer=gpu
```

Train model with chosen experiment configuration from [configs/experiment/](configs/experiment/)

```bash
python src/train.py experiment=experiment_name.yaml
```

You can override any parameter from command line like this

```bash
python src/train.py trainer.max_epochs=20 data.batch_size=64
```