A deep learning textbook that actually runs
It exists to replace static deep learning chapters with Jupyter notebooks you can actually run, edit, and break.

What it does
D2L.ai is an open-source textbook—published by Cambridge University Press—that teaches deep learning through Jupyter notebooks. Every chapter mixes exposition, math, figures, and self-contained code you can execute, modify, and break. It is freely available under a Creative Commons license and aims to bridge reading about machine learning and actually doing it.
The interesting bit
Most textbooks treat code as a static illustration; here the manuscript is the repo. Drafting the entire book in notebooks means examples stay runnable as frameworks evolve, and readers can patch a typo or test a hunch without leaving the chapter.
Key highlights
- Entire manuscript drafted in Jupyter notebooks with runnable, self-contained examples.
- Adopted at 500 universities across 70 countries, including Stanford, MIT, Harvard, and Cambridge.
- Multi-framework code coverage alongside math and interactive discussion.
- Published in 2023 by Cambridge University Press; sample code carries a modified MIT license.
- Community contributions are merged directly into the living manuscript.
Verdict
Ideal for students and practitioners who want theory paired with executable homework; skip it if you are looking for a drop-in model zoo or the latest research implementations.
Frequently asked
- What is d2l-ai/d2l-en?
- It exists to replace static deep learning chapters with Jupyter notebooks you can actually run, edit, and break.
- Is d2l-en open source?
- Yes — d2l-ai/d2l-en is an open-source project tracked on heatdrop.
- What language is d2l-en written in?
- d2l-ai/d2l-en is primarily written in Python.
- How popular is d2l-en?
- d2l-ai/d2l-en has 29.2k stars on GitHub and is currently cooling off.
- Where can I find d2l-en?
- d2l-ai/d2l-en is on GitHub at https://github.com/d2l-ai/d2l-en.