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.
Please follow the following steps to run the project locally
git clone https://github.com/m-np/pytorch-dl-models.git
- Open Anaconda console/Terminal and navigate into project directory
cd path_to_repo
- Run
conda create --name <env_name> python==3.9
. - 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
- Run
conda install -c anaconda ipykernel
- 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:
- Open Anaconda console/Terminal and navigate into project directory
cd path_to_repo
- Run
conda activate <env_name>
- Run
pip install -r requirements.txt
found 👉requirements.txt
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
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
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