explaingit

d2l-ai/d2l-en

28,859PythonAudience · generalComplexity · 2/5StaleLicenseSetup · easy

TLDR

Free, interactive textbook teaching deep learning through explanations, math, and runnable code in Jupyter notebooks. Learn by doing, from basics to advanced techniques.

Mindmap

mindmap
  root((repo))
    What it does
      Interactive textbook
      Jupyter notebooks
      Learn by coding
    Topics covered
      Computer vision
      Data science
      Neural networks
      Advanced techniques
    Tech stack
      Python
      Multiple frameworks
      Jupyter
    Use cases
      Self-study learning
      University courses
      Build AI models
    Audience
      Students
      Self-taught devs
      PMs and founders

Things people build with this

USE CASE 1

Learn deep learning fundamentals and train your first neural network model from scratch.

USE CASE 2

Teach or take a university-level AI course with structured, hands-on material.

USE CASE 3

Understand computer vision and build image recognition systems with working code examples.

USE CASE 4

Explore advanced techniques like Gaussian processes and hyperparameter tuning with executable notebooks.

Tech stack

PythonJupyterPyTorchTensorFlowNumPyPandas

Getting it running

Difficulty · easy Time to first run · 5min
Free to use, share, and adapt under Creative Commons license; attribution required but no commercial restrictions.

In plain English

D2L.ai, short for "Dive into Deep Learning," is a free, open-source textbook designed to teach deep learning (the branch of AI that powers things like image recognition, chatbots, and recommendations) by combining explanations, math, and runnable code all in one place. The idea is that the best way to understand these concepts is to actually run and tweak the code yourself, not just read theory. The book lives as a collection of Jupyter notebooks, interactive documents where you can read the explanation and execute the code in the same window. Each chapter covers a concept, then shows you working code examples you can run immediately without any extra setup. Who would use this? Anyone who wants to go from "I've heard of AI" to "I can actually build and train models", whether you're a student, a self-taught developer, a PM wanting to understand the technology, or a founder evaluating what's technically possible. It assumes some math familiarity but no prior AI experience. It's been adopted by hundreds of universities including Stanford, MIT, Harvard, and Cambridge, which signals that it's structured enough for formal coursework but accessible enough for self-study. The codebase and content are written in Python, and the notebooks are designed to run on multiple deep-learning frameworks so you're not locked into one ecosystem. Topics include computer vision (teaching computers to see), data science fundamentals, and advanced techniques like Gaussian processes and hyperparameter optimization. The book is free under a Creative Commons license, and there's an active community forum for questions.

Copy-paste prompts

Prompt 1
I want to learn deep learning from scratch. Walk me through the first few chapters of D2L.ai and show me how to run the code examples in a Jupyter notebook.
Prompt 2
How do I use D2L.ai to understand convolutional neural networks for image classification? Show me the relevant chapter and a simple example I can modify.
Prompt 3
Set up a D2L.ai notebook locally and help me train a model on a dataset. Which chapters should I read first?
Prompt 4
I'm a PM trying to understand what's technically feasible with deep learning. Which D2L.ai chapters would give me the best overview without getting too mathematical?
Prompt 5
Show me how to adapt a D2L.ai code example to work with my own data for a computer vision task.
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.