How rasbt/deeplearning-models works
Purpose and Entry Points
This is an educational deep-learning notebook collection, not a deployed application or unified package. Users execute topic-specific Jupyter notebooks directly. README.md is the catalog and primary navigation surface; runnable entry points are notebooks under pytorch_ipynb/, pytorch-lightning_ipynb/, and tensorflow1_ipynb/.
Framework Partition
The repository maintains parallel implementations across three runtime families:
• Native PyTorch experiments: pytorch_ipynb/cnn/, pytorch_ipynb/rnn/
• PyTorch Lightning versions of selected supervised-learning workflows: pytorch-lightning_ipynb/cnn/, pytorch-lightning_ipynb/transformer/
• Legacy TensorFlow 1.x equivalents: tensorflow1_ipynb/cnn/, tensorflow1_ipynb/mechanics/
These are largely independent instructional tracks rather than interchangeable modules.
PyTorch Shared Workflow Layer
Native PyTorch notebooks can reuse local helpers for common training lifecycle stages: data loading, training, evaluation, plotting, and utility behavior. The principal shared-code boundary is:
• pytorch_ipynb/helper_data.py
• pytorch_ipynb/helper_train.py
• pytorch_ipynb/helper_evaluate.py
Typical notebook control flow is dataset acquisition/preprocessing → Dataset/DataLoader batching → model definition → optimization loop → metrics/visualization. Individual notebooks remain responsible for their model and experiment configuration.
Model Families and Learning Tasks
The main educational content is organized by model/task families:
• Supervised tabular and image classification, MLPs, and CNN architecture variants: pytorch_ipynb/basic-ml/, pytorch_ipynb/mlp/, pytorch_ipynb/cnn/
• Sequence and NLP models, from RNNs through DistilBERT: pytorch_ipynb/rnn/, pytorch_ipynb/transformer/
• Generative representation/modeling work: pytorch_ipynb/autoencoder/, pytorch_ipynb/gan/
• Specialized methods: ordinal regression and graph neural networks: pytorch_ipynb/ordinal/, pytorch_ipynb/gnn/
Each notebook is a self-contained experiment, often using the same conceptual pipeline but different architectures, loss functions, or datasets.
Data, Model, and Runtime Boundaries
Data is primarily external or downloaded at execution time (e.g., MNIST, CIFAR-10, CelebA, IMDB, QuickDraw); only small example datasets are versioned under pytorch_ipynb/data/ and tensorflow1_ipynb/data/. Dataset-specific ingestion examples live in pytorch_ipynb/mechanics/; TensorFlow 1.x storage/pipeline examples cover HDF5, NPZ, TFRecords, and queues in tensorflow1_ipynb/mechanics/.
Material external ecosystems include PyTorch, TorchVision, PyTorch Lightning, TensorFlow 1.x, Hugging Face/DistilBERT, scikit-learn, TorchMetrics, and selected libraries such as pl_cross and embetter. GPU-oriented examples demonstrate DataParallel, pipeline parallelism, pinned memory, AMP, and gradient checkpointing.
Lightning and Experiment Templates
Lightning notebooks encapsulate model/training lifecycle under Lightning abstractions, including augmentation, cross-validation, and transformer fine-tuning. Key examples are pytorch-lightning_ipynb/data-augmentation/autoaugment/with-autoaugment.ipynb, pytorch-lightning_ipynb/kfold/kfold-light-cnn-mnist.ipynb, and pytorch-lightning_ipynb/transformer/distilbert-finetuning-ii.ipynb.
Reusable starting points and batch/HPC-oriented execution artifacts are isolated under templates/pytorch_lightning/, notably templates/pytorch_lightning/template_classification_basic.ipynb and templates/pytorch_lightning/tune_classification_basic.py.
Visualization and Interpretation
Visualization is an adjunct execution stage: notebooks train/load a CNN then compute input-gradient or guided-backprop interpretations. The Cats-vs-Dogs VGG16 visualization subset contains reusable model/data code at pytorch_ipynb/viz/cnns/cats-and-dogs/vgg16.py and pytorch_ipynb/viz/cnns/cats-and-dogs/datautils.py, consumed by adjacent visualization notebooks.
Main entry points: README.md README catalog · helper_train.py Training helpers · distilbert-finetuning-ii.ipynb Lightning DistilBERT · vgg16.py CNN interpretation
Components 17
Native PyTorch
Self-contained instructional notebooks with optional shared helpers.
- Supervised models · Tabular, MLP, and CNN classification experiments.
- Sequence & NLP · RNN through DistilBERT experiments.
- Transformer notebooks
- Generative models · Autoencoder and GAN experiments.
- Specialized methods · Ordinal regression and graph neural network notebooks.
- Dataset mechanics · Dataset-specific ingestion examples.
- Training helpers · Shared data loading, training, and evaluation lifecycle helpers.
pytorch_ipynb/helper_train.py - Versioned examples · Small bundled example datasets.
- CNN interpretation · Input-gradient and guided-backprop visualization workflows.
pytorch_ipynb/viz/cnns/cats-and-dogs/vgg16.py
PyTorch Lightning
Lightning-based training and fine-tuning examples.
- Lightning workflows · Augmentation, cross-validation, and supervised training examples.
- Lightning DistilBERT
pytorch-lightning_ipynb/transformer/distilbert-finetuning-ii.ipynb - Lightning templates · Reusable notebook and batch/HPC-oriented training starters.
TensorFlow 1.x
Legacy parallel instructional track.
- TF1 CNN experiments · Legacy TensorFlow 1.x model equivalents.
- TF1 data pipelines · HDF5, NPZ, TFRecords, and queue examples.
- TF1 example data
Other components
- README catalog · Primary catalog for directly executed notebooks.
README.md - External datasets · Datasets are commonly downloaded during notebook execution.
Connections 21
- README catalog → Supervised models: catalogs
- README catalog → Sequence & NLP: catalogs
- README catalog → Lightning workflows: catalogs
- README catalog → TF1 CNN experiments: catalogs
- External datasets → Dataset mechanics: ingestion examples
- External datasets → Supervised models: downloaded at runtime
- External datasets → Sequence & NLP: downloaded at runtime
- Versioned examples → Supervised models: small examples
- Dataset mechanics → Supervised models: feeds experiments
- Training helpers → Supervised models: optional training lifecycle
- Training helpers → Sequence & NLP: optional training lifecycle
- Training helpers → Generative models: optional training lifecycle
- Sequence & NLP → Transformer notebooks: includes NLP progression
- Supervised models → CNN interpretation: trained CNNs interpreted
- External datasets → Lightning workflows: training data
- Lightning templates → Lightning workflows: starting patterns
- Lightning templates → Lightning DistilBERT: training pattern
- External datasets → Lightning DistilBERT: fine-tuning data
- External datasets → TF1 data pipelines: storage and pipeline formats
- TF1 data pipelines → TF1 CNN experiments: feeds experiments
- TF1 example data → TF1 data pipelines: small examples