Skip to content

Guide · Open source

How to use deeplearning-models: notebooks, setup and tips

Updated · written with AI from the project's own documentation and checked against our catalogue data

deeplearning-models is an MIT-licensed collection of Jupyter Notebooks by rasbt, covering deep learning architectures from simple perceptrons to convolutional models such as LeNet, AlexNet, VGG, DenseNet and MobileNet. It is written for TensorFlow and PyTorch and organized by topic. This guide shows you how to get the notebooks, find the one you need and run it, so you can see how a given architecture is built and trained.

deeplearning-modelsrasbt/deeplearning-models · ★ 17.6k · MIT

Quick start

  1. 1Clone the repository. Run git clone https://github.com/rasbt/deeplearning-models in a terminal.
  2. 2Install Python and Jupyter. Make sure Python and Jupyter Notebook are installed before opening any notebook.
  3. 3Pick a model. Use the topic tables in the README to find a model such as LeNet-5 or MobileNet-v2.
  4. 4Choose a framework. Open the pytorch_ipynb, pytorch-lightning_ipynb or tensorflow1_ipynb folder, depending on the framework you want.
  5. 5Open the notebook. Start Jupyter from the cloned folder and open the .ipynb file you picked.
  6. 6Run the cells in order. Execute each cell from top to bottom and read the code to see how the architecture is built and trained.

What is deeplearning-models?

The repository is a set of notebooks, each implementing a specific model. Its README describes it as a collection of various deep learning architectures, models, and tips for TensorFlow and PyTorch in Jupyter Notebooks.

It is best read as a study and reference resource rather than a finished application or production library.

  • Traditional machine learning: perceptron, logistic regression, softmax regression
  • Multilayer perceptrons: with dropout, batch normalization, and backpropagation from scratch
  • Convolutional networks: LeNet-5, AlexNet, DenseNet-121, VGG-16, MobileNet-v2 and v3, Network in Network

What do you need before you start?

The README lists Jupyter Notebook and Python as the prerequisites. The notebooks are written for PyTorch and TensorFlow, so you need the framework used by the notebook you open. The README does not list exact versions, so check each notebook's imports when you run it.

  • Python
  • Jupyter Notebook
  • PyTorch for files in pytorch_ipynb or pytorch-lightning_ipynb
  • TensorFlow for files in tensorflow1_ipynb

How do you download the notebooks?

Clone the repository with git. The README gives this command:

git clone https://github.com/rasbt/deeplearning-models

How do you find the right notebook?

The README groups notebooks into tables by topic: Traditional Machine Learning, Multilayer Perceptrons, and Convolutional Neural Networks for Computer Vision, which is split into sections such as AlexNet, DenseNet, LeNet, MobileNet and VGG. Each row names the model, the dataset where one is given, and links to the notebook for each framework.

Notebook paths follow a pattern: a folder per framework (pytorch_ipynb, pytorch-lightning_ipynb, tensorflow1_ipynb), then a topic folder such as basic-ml, mlp or cnn. For example, the LeNet-5 notebook on MNIST is at pytorch_ipynb/cnn/cnn-lenet5-mnist.ipynb.

  • Pick a model from the topic tables
  • Choose the framework folder you want to compare or study
  • Open the matching .ipynb file in Jupyter

How do you run a notebook?

Open the repository folder in Jupyter Notebook and double-click the notebook you chose. Read the cells from top to bottom, since each one builds on earlier code. The README does not document a single run command, so Jupyter is the entry point.

  • Start Jupyter from the cloned folder
  • Run cells in order
  • Compare the PyTorch and TensorFlow versions of the same model if you want to see the differences

What should you keep in mind?

Most table descriptions in the README are marked TBD, so the notebooks themselves are your main source of explanation. Read the code comments and markdown cells closely. Many notebooks train on datasets such as MNIST or CIFAR-10, so expect that training can take a long time on a laptop.

  • Use the notebooks as a starting point to adapt, not as a finished product
  • Check the framework version each notebook expects

What people use it for

  • Students learning how LeNet or AlexNet is structured layer by layer
  • Developers adapting a working PyTorch CNN notebook to their own dataset
  • Comparing the same model, such as the MLP on MNIST, across PyTorch and TensorFlow
  • Studying regularization ideas by comparing the dropout and batch normalization MLP notebooks

Frequently asked questions

Is deeplearning-models free to use?

Yes, the repository is released under the MIT licence, as listed on its page. Check the LICENSE file in the repo for the full terms.

How do I install deeplearning-models?

There is no installer. Clone the repository with git clone https://github.com/rasbt/deeplearning-models, then open the notebooks in Jupyter Notebook with Python installed.

What do I need to run the notebooks?

The README lists Jupyter Notebook and Python as prerequisites. You also need PyTorch or TensorFlow, depending on which notebook folder you use.

Does it include written explanations for each model?

Not in detail. Most description cells in the README tables are marked TBD, so the notebooks' own text and code are the main explanation.

Is this a production library?

No. The README describes a collection of notebooks for study and reference, not a ready-made application or production library.

What are good alternatives to deeplearning-models?

The page lists fast.ai course notebooks, d2l.ai (Dive into Deep Learning), and pytorch/examples as comparable projects. Pick one based on whether you want a course, a textbook, or short code examples.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use deeplearning-models if you are a student or developer who wants working PyTorch and TensorFlow notebooks to read, run and adapt for classic architectures like LeNet, AlexNet and VGG. Skip it if you need a finished application, a production library, or detailed written explanations for every model, since most of its descriptions are still TBD.

Install options & downloads