What to learn, what to build in, and what to reuse — a first-principles course in Python and PyTorch, and the textbook for DS 6050 Deep Learning (School of Data Science, University of Virginia), by Heman Shakeri. Written in the open; every figure and result is produced by code in the source. Experiments show their code, while concept diagrams keep their drawing source in the repository. The examples are written directly in Python and PyTorch and are CPU-friendly.
Read it: https://shakeri-lab.github.io/dl-book/ (canonical HTML edition) · print PDF · continuous-screen PDF
Support it: The complete book remains free at $0. Optional contributions toward continued corrections, figures, and open releases are welcome at Buy Me a Coffee.
Stable release: v1.2.1 (August 2, 2026). The live site is a rolling post-v1.2.1 build.
Nearly every construct in modern deep learning is a classical idea made learnable: linear regression → MLP; fixed image filters → CNNs; kernel regression → attention → Transformers; and finally the pretrained era, where we adapt rather than train. The book replays that one move in the course's conceptual order and the book's self-contained voice.
- Part I · From Lines to Networks — linear/logistic regression, MLPs, training, backprop, and the signature chapter: generalization failure in pictures → inductive bias.
- Part II · Vision — filters → learnable filters (CNNs) → modern CNNs & transfer.
- Interludes — experimentation as a method; PCA → learnable linear and nonlinear autoencoders; attention as test-time regression and a spectrum of memory solvers.
- Part III · Sequences — RNNs, encoder–decoder.
- Part IV · Attention — kernel regression → attention → self-attention → BERT → ViT/scaling.
- Part V · The Pretrained Era — PEFT/quantization, alignment, generative models, and multimodal contrastive learning, followed by an epilogue that hands the book's question to the reader.
python3.12 -m venv ~/.venvs/dl-book && ~/.venvs/dl-book/bin/pip install -r requirements.txt
QUARTO_PYTHON=$HOME/.venvs/dl-book/bin/python quarto render # HTML + print PDF
QUARTO_PYTHON=$HOME/.venvs/dl-book/bin/python quarto render \
--profile screen --to pdf --no-clean # continuous PDFExecution uses Quarto freeze — CI never runs cells; refresh a chapter's cache with
QUARTO_PYTHON=$HOME/.venvs/dl-book/bin/python quarto render chapters/part1/01-linear-regression.qmd --execute
before committing.
Chapters are drafted from the instructor's LaTeX lecture notes (sources/), the course's
lecture transcripts, and his roadmap essay — see docs/drafting-template.md and
docs/style-guide.md. Mechanical conversion: scripts/tex2qmd.sh; TikZ figures:
scripts/build_tikz.sh. The full operational runbook (environment, per-chapter steps,
quality gates, failure modes) is in CLAUDE.md — it is auto-loaded by Claude
Code sessions working in this repo.
Continuing or contributing? Start with docs/CONTINUING.md (project status, working protocol, standing author rules, and roadmap) and docs/arc-seeds.md (the cross-chapter seed/harvest ledger every new chapter must respect). These documents are the project's persistent memory and are updated after every shipped chapter.
Suggested citation: Shakeri, Heman. 2026. Deep Learning: Making It Learnable. Version 1.2.1. https://shakeri-lab.github.io/dl-book/. The repository also provides machine-readable metadata in CITATION.cff.
- Text and figures: CC BY-NC-SA 4.0
- Code (all code cells and
code/): MIT - Third-party data, weights, and attributed teaching fragments: see THIRD_PARTY_NOTICES.md
No content in this book is derived from Dive into Deep Learning (d2l.ai) or any other textbook; the exposition and code are original to the course.