Skip to content

This repo consists of different Deep Learning Models used for various ML tasks.

License

Notifications You must be signed in to change notification settings

m-np/pytorch-dl-models

Repository files navigation

Pytorch Deep Learning Models
GitHub issues GitHub forks GitHub stars PRs Welcome

Objective: This repo is designed to build different Deep Learning models from scratch in Pytorch. Here, we are focused on understanding the different building blocks that make up different models.
Once the models are developed they can be trained on different datasets however I have not linked different datasets in this repo.
To understand the repo check HOWTO.md file.


Setup

Please follow the following steps to run the project locally

  1. git clone https://github.com/m-np/pytorch-dl-models.git
  2. Open Anaconda console/Terminal and navigate into project directory cd path_to_repo
  3. Run conda create --name <env_name> python==3.9.
  4. Run conda activate <env_name> (for running scripts from your console or set the interpreter in your IDE)

For adding the new conda environment to the jupyter notebook follow this additional instruction

  1. Run conda install -c anaconda ipykernel
  2. Run python -m ipykernel install --user --name=<env_name>

For pytorch installation:

PyTorch pip package will come bundled with some version of CUDA/cuDNN with it, but it is highly recommended that you install a system-wide CUDA beforehand, mostly because of the GPU drivers. I also recommend using Miniconda installer to get conda on your system. Follow through points 1 and 2 of this setup and use the most up-to-date versions of Miniconda and CUDA/cuDNN for your system.


For other module installation, please follow the following steps:

  1. Open Anaconda console/Terminal and navigate into project directory cd path_to_repo
  2. Run conda activate <env_name>
  3. Run pip install -r requirements.txt found 👉 requirements.txt

Table of content

This repo showcases models from the below ML tasks

ML Task ML Model Description
CV LeNet Designed for Image Classification Task
AlexNet Designed for Image Classification Task
VGG16 Designed for Image Classification Task
ResNet50 Designed for Image Classification Task
InceptionV1 Designed for Image Classification Task
MobilenetV1 Designed for Image Classification Task
NLP Transformer Designed for Machine Translation
Bert Designed for Language Modeling
Audio Wavenet Designed for Speech generation
Tacotron2 Designed for Speech
Recommendation System Ripplenet Designed for KG style personalization model
Neural Collaborative Filtering Collaborative filtering with Neural Networks
Wide and Deep Wide and deep network for recommendation System
Deep and Cross Deep and Cross network for recommendation System

The above models are also registered in the following model registry

Usage

For visualizing a model for a task, please follow the following steps after running conda activate <env_name>

python main.py -t <MLTask> -m <MLModel as per above table>

You can also check the various MLTask/MLModel in the following model registry

LICENSE

License: MIT

Resources

References obtained from following sources :

AlexNet - blog
ResNet50 - blog
InceptionV1 - research paper
MobilenetV1 - research paper
Transformer - blog research paper
Bert - blog research paper
Wavenet - research paper reference code
Tacotron2 - research paper reference code