explaingit

d2l-ai/d2l-zh

77,894PythonAudience · developerComplexity · 2/5StaleLicenseSetup · easy

TLDR

Interactive Chinese-language textbook teaching deep learning from math fundamentals to implementation, with runnable Python code paired to every concept.

Mindmap

mindmap
  root((repo))
    What it does
      Interactive textbook
      Math to code
      Runnable examples
    Content
      Deep learning theory
      Mathematical foundations
      Implementation guides
    Use cases
      Learning deep learning
      Teaching courses
      Reference material
    Tech stack
      Python
      Jupyter notebooks
      MXNet framework
    Audience
      Students
      Educators
      Researchers

Things people build with this

USE CASE 1

Learn deep learning from foundational math through working code examples in Chinese.

USE CASE 2

Teach a university course using a textbook that pairs theory with runnable Python implementations.

USE CASE 3

Reference mathematical concepts and their direct code implementations side-by-side.

Tech stack

PythonJupyterMXNetNumPyMatplotlib

Getting it running

Difficulty · easy Time to first run · 5min
Open-source educational material free to use and modify for learning and teaching purposes.

In plain English

d2l-zh is the Chinese-language version of "Dive into Deep Learning" (D2L.ai), an open educational project that teaches deep learning in a hands-on way. Rather than software you run as an app, the repository is the source of an interactive book that combines text explanations, mathematical background, and runnable code in one place. The README mentions that both the Chinese and English versions are used as teaching material at more than 500 universities across over 70 countries. The project sets out a small set of goals. It is meant to be free for everyone on the web, deep enough to take readers from understanding the underlying mathematics to actually implementing and improving methods, and structured around code a reader can run, modify, and inspect, so a mathematical formula on the page corresponds directly to lines of code you can experiment with. The authors emphasize keeping the material continuously updated and complementing the text with a discussion forum. The README points to a second edition at zh.D2L.ai and a first edition at zh-v1.D2L.ai, with separate installation instructions for the source code accompanying each edition. The English open-source version is in a sibling repository, and a set of teaching slides comes from a UC Berkeley course that used the book as its textbook. There is a bibliography entry citing the book, published by Cambridge University Press in 2023. Someone would use this when learning deep learning in Chinese, teaching a course, or wanting a single resource that pairs theory with code. The runnable code is in Python.

Copy-paste prompts

Prompt 1
Show me how to set up the d2l-zh repository and run the first deep learning example in Jupyter.
Prompt 2
I want to understand backpropagation, walk me through the math explanation and Python code from d2l-zh chapter on automatic differentiation.
Prompt 3
How do I modify a neural network example from d2l-zh to experiment with different layer sizes and activation functions?
Prompt 4
What's the structure of d2l-zh's code examples, and how do I navigate between the textbook explanations and the runnable notebooks?
Open on GitHub → Explain another repo

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