# rasbt/deeplearning-models: A Notebook Collection for Reading Architectures Side by Side

> The repository is a library of Jupyter notebooks that implement the same models in PyTorch, PyTorch Lightning and TensorFlow 1.0. It is a study aid for engineers who want to compare implementations, not a framework to install.

**rasbt/deeplearning-models** — A collection of various deep learning architectures, models, and tips

- Repository: https://github.com/rasbt/deeplearning-models
- Stars: 17,608 · Forks: 4,094
- Language: Jupyter Notebook
- License: MIT
- Published: 2026-09-28 · Updated: 2026-09-28 · Language: en
- Canonical page: https://hysenlabs.com/projects/rasbt-deeplearning-models

## What rasbt/deeplearning-models actually is

This repository is a set of Jupyter notebooks that implement deep learning architectures and traditional machine learning models. The README organizes them into sections such as Traditional Machine Learning, Multilayer Perceptrons and Convolutional Neural Networks for Computer Vision, and each row in those tables points to one or more notebooks. The distinguishing feature is the parallel structure: a single model often exists in three versions, a plain PyTorch notebook under pytorch_ipynb/, a PyTorch Lightning notebook under pytorch-lightning_ipynb/, and a TensorFlow 1.0 notebook under tensorflow1_ipynb/. The README labels the TensorFlow column with the badge text Tensor-Flow1.0, so the version is stated rather than implied.

The audience is someone who already knows Python and wants to see how a specific architecture is written. The tables list datasets such as MNIST, CIFAR-10, Iris, 2D toy data and QuickDraw, so the examples are small enough to run on a laptop. There is no package on any index, no command line tool and no server component. You clone the repository and open notebooks.

## How the parallel PyTorch, Lightning and TensorFlow notebooks are organized

The top level of the repository contains pytorch_ipynb/, pytorch-lightning_ipynb/, tensorflow1_ipynb/, templates/ and README.md. That layout is the whole architecture. There is no shared library module that the notebooks import, so each notebook carries its own model definition, training loop and evaluation code. The consequence is duplication: a fix to a training loop in one notebook does not propagate to the others.

The upside of that duplication is that a notebook can be read top to bottom without chasing imports. If you want to see how a multilayer perceptron with batch normalization is written, the README points to pytorch-lightning_ipynb/mlp/mlp-batchnorm.ipynb, pytorch_ipynb/mlp/mlp-batchnorm.ipynb and tensorflow1_ipynb/mlp/mlp-batchtnorm.ipynb. Note that the TensorFlow path in the README is spelled mlp-batchtnorm.ipynb while the PyTorch paths use mlp-batchnorm.ipynb; the file names are not perfectly consistent across the three trees, so copy paths from the README rather than guessing them.

The coverage is broad rather than deep. The convolutional section alone lists basic CNNs, He initialization, fully connected to convolutional conversion, AlexNet with and without grouped convolutions, DenseNet-121 on MNIST and CIFAR-10, an all-convolutional network, LeNet-5 on MNIST, CIFAR-10 and QuickDraw, and MobileNet-v2 on CIFAR-10. The README's Description column is filled with TBD for most rows, so the table tells you the architecture and the dataset but not what the notebook demonstrates beyond that.

## Installing and running a first notebook

The README does not give install instructions, so there is no project-specific installer to copy. What you install is a Python environment with Jupyter and the framework used by the notebook you pick. A clone followed by a virtual environment and Jupyter is the minimum:

```bash
git clone https://github.com/rasbt/deeplearning-models.git
cd deeplearning-models
python -m venv .venv
source .venv/bin/activate
pip install jupyter
```

After that, choose a notebook from the README table and install the framework that notebook targets. For a plain PyTorch notebook the README badge reads Py-Torch, and for a Lightning notebook it reads PyTorch-Lightning. The repository does not pin versions, and the TensorFlow notebooks are labeled Tensor-Flow1.0, so a current TensorFlow install will not match them.

Start with a small model to confirm the environment works before touching a convolutional notebook:

```bash
jupyter notebook pytorch_ipynb/basic-ml/logistic-regression.ipynb
```

That notebook is listed in the README against 2D toy data, so it has no dataset download step. If it runs end to end, the environment is sound. For a notebook that names MNIST or CIFAR-10, expect the notebook itself to fetch the data on first run; the README does not document a separate download step.

## Where the collection stops being useful

The TensorFlow notebooks are the clearest limitation. The README labels them Tensor-Flow1.0, and TensorFlow 1.0 code relies on APIs that were removed in TensorFlow 2. Running those notebooks today means either installing an old TensorFlow release or rewriting the imports and session handling. The repository does not present a migration path, and there are no releases, so there is no tagged version that guarantees a consistent set of framework versions across the notebooks.

The second limitation is that the notebooks are demonstrations, not trained artifacts. The README describes models and datasets; it does not describe saved weights, a model zoo, or an inference API. You cannot download a trained AlexNet from this repository and run predictions with it. If your task is to classify images tomorrow, this collection gives you code to read, not a model to call.

The third is maintenance shape. The last push to the repository was on 2026-09-26, so the repository is not dormant. That does not mean every notebook tracks the current API of its framework, because the README still labels one whole tree as TensorFlow 1.0. A recent push and a current dependency set are different things.

Finally, the README's Description column is largely TBD. Anyone expecting a paragraph explaining what each notebook teaches will not find it in the table; the notebooks themselves are the documentation.

## How it compares with a framework's own model zoo

The obvious alternative is the model collection shipped by the framework you already use. torchvision provides reference implementations of architectures such as AlexNet, DenseNet and MobileNet together with pretrained weights, and it is installed as a dependency of PyTorch. The difference in approach is that torchvision gives you importable classes maintained against the current PyTorch release, while this repository gives you readable notebooks that show the training loop, the data pipeline and the evaluation in one place, with no pretrained weights.

That distinction decides the use case. If you need a working classifier, torchvision's pretrained models are the shorter path. If you need to understand why a DenseNet-121 is wired the way it is, or how grouped convolutions change an AlexNet, a notebook that builds the model from layers is more instructive than a library class that hides the construction behind a constructor argument. The repository also covers ground that model zoos generally do not, such as a multilayer perceptron with backpropagation written from scratch, and converting fully connected layers into equivalent convolutional layers.

The two are not exclusive. A reasonable workflow is to read the notebook to understand the architecture, then use the framework's maintained implementation in production code.

## Licence and what upgrading costs

The repository is MIT licensed, with a LICENSE file at the top level. MIT permits use, modification and redistribution with the licence and copyright notice retained. That is permissive for copying code out of a notebook into your own project. It is not legal advice, and the notebooks may reference datasets with their own terms, so check the dataset you intend to use separately.

Upgrade cost is per notebook, not per repository. There is no package version to bump and no changelog. If you copy a training loop into a project and later move to a newer framework release, you own that migration. The TensorFlow 1.0 tree is the concrete example: keeping it running requires either pinning an old TensorFlow or porting each notebook you care about. Because there are no releases, there is also no way to pin the repository itself to a known-good state other than a commit hash.

## Conclusion

Adopt this repository as a reading and teaching resource if you learn by comparing implementations or need a reference for classic architectures such as LeNet-5, AlexNet and DenseNet-121. Do not adopt it as a dependency, as a maintained framework, or as a source of current TensorFlow 2 code, because the TensorFlow notebooks are written for TensorFlow 1.0 and there are no releases to pin. Before relying on any notebook, open it and check which framework version its imports target, and check whether the dataset it names is still downloadable.

## FAQ

### What are examples of deep learning models in rasbt/deeplearning-models?

The README lists traditional models such as perceptron, logistic regression and softmax regression, multilayer perceptrons with dropout and batch normalization, and convolutional networks including LeNet-5, AlexNet, DenseNet-121, MobileNet-v2 and an all-convolutional network.

### Are the deep learning models in rasbt/deeplearning-models unsupervised?

The README does not describe the notebooks as unsupervised. The listed examples are supervised models trained on labeled datasets such as MNIST, CIFAR-10, Iris and QuickDraw.

### Are the deep learning models in rasbt/deeplearning-models deterministic?

The README does not state anything about determinism or random seed handling, so this cannot be answered from the repository's documentation.

### Are the deep learning models in rasbt/deeplearning-models black box models?

The notebooks are source code, so the model definitions, training loops and evaluation steps are all visible and editable. The README does not make any claim about interpretability of the trained models themselves.

### Is rasbt/deeplearning-models about AI?

The README describes a collection of deep learning architectures, models and tips for TensorFlow and PyTorch in Jupyter Notebooks, which falls under what is commonly called AI. The repository itself is a set of notebooks, not an AI service.

## Sources

- [Issues](https://github.com/rasbt/deeplearning-models/issues)
- [License: MIT](https://github.com/rasbt/deeplearning-models/blob/master/LICENSE)
- [rasbt/deeplearning-models on GitHub](https://github.com/rasbt/deeplearning-models)
- [README](https://github.com/rasbt/deeplearning-models/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/rasbt-deeplearning-models
