Skip to content

jmaczan/deep-learning-pytorch

Repository files navigation

🌻 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

Hopefully each of them will get a dedicated blog post on my humble tech blog maczan.pl

  • LeNet
  • AlexNet - a from scratch guide to build your own AlexNet you can find on my blog: maczan.pl
  • VGG 📝 In progress 📚
  • ResNet
  • Inception
  • DenseNet
  • RNN
  • LSTM
  • GRU (Gated Recurrent Units)
  • Transformer
  • GPT (maybe Karpathy's resources on this topic?)
  • GAN
  • VAE (Variational autoencoder)
  • U-Net
  • Siamese Network
  • BERT
  • Self-attention
  • Sequence-to-Sequence
  • DQN
  • A3C
  • Neural ODEs (ordinary differential equations)
  • GNN (Graph Neural Network)
  • EfficientNet

Installation

Pip

# 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

# 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

# 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/

python src/train.py experiment=experiment_name.yaml

You can override any parameter from command line like this

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