Dive into Deep LearningAston Zhang, Zachary C. Lipton, Mu Li, Alexander J. Smola
Dive into Deep Learning
by Aston Zhang, Zachary C. Lipton, Mu Li, Alexander J. Smola · first published 2023
42mentions
30recommended by
35HN commenters
2019–2025first – last mentioned
86% recommend11% neutral3% critical
Why HN recommends it
Free online deep learning text that pairs math with runnable code, balancing theory and practice. Covers modern topics such as attention, with PyTorch examples; suits learners who want to build from scratch.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.






If you want just one book to learn all things deep learning from scratch with coding including the latest techniques, it should be Dive into deep learning [0]. Really underrated and not well-known. [0] https://d2l.ai/
on “Intro to Deep Learning” ↗Cool! What motivated you to write it? I find the d2l implementation nice and simple as well https://d2l.ai/chapter_attention-mechanisms/transformer.html The one in pytorch itself isnt so bad either. Be nice to see some examples of decoding in your repo (forgive me if I dont see it). I remeber when i first implemented a transformer from scratch generating sequences using greedy or beam search aft
on “A Simple Transformer Implementation(PyTorch) Without Difficult Syntax” ↗…some nodes and split others, maybe that's easy in PyTorch. If that's the case, I'll take a second look. Until then, when I have some time, I'm really tempted to invest some time in MXNet, as the book "Dive into Deep Learning" appears to be quite good.
on “Tensorflow 2.0 Beta 0” ↗Not affiliated in any way, but I have always found https://d2l.ai a pretty good mix of rigor and working code.
on “Learn Machine Learning” ↗https://d2l.ai/chapter_optimization/index.html
on “Ask HN: What to study to learn optimization algorithms” ↗"Dive Into Deep Learning" - d2l.ai
on “Ask HN: Resources to encourage teen on becoming computer engineer?” ↗I'm in a similar situation. I'm having to learn linear algebra,calc,basic prob, and brush up on all of my holes in between. I haven't found a direct path, however. What has helped me is this deep learning book[0] which has spelled out very plainly what I need to learn. From there I use a combination of math is fun[1], better explained[2] and 3blue1brown. math is fun really helps by just giving you
on “Mathematics for the Adventurous Self-Learner” ↗See if sphinx-doc[1] suits your needs. http://d2l.ai is a good example of an online book done using Sphinx. Supports discussions through Discourse integration. You write content using reST or Markdown (HTML is also possible). Sphinx generates a static site. JavaScript can be used for dynamic content integration. Supports built-in keyword search using only JS. A theme like mxtheme makes it look go
on “Ask HN: Best way to publish a free book online?” ↗Have been hearing good things about this - http://d2l.ai/ Have to get to it soon.
on “Applications of Deep Neural Networks v2 [pdf]” ↗The Dive into Deep Learning book is the first book I've seen with a chapter dedicated to the Attention Mechanism. Attention is central in recent breakthroughs like AlphaStar and AlphaFold, and a major omission from other books,…
on “Dive into Deep Learning (Updated 2021)” ↗What would be great is make the code windows tabbed where each code block is listed in R, Python, and Julia... something similar to Dive into Deep Learning. For example: https://d2l.ai/chapter_linear-networks/linear-regression-scr.... To the book author, thank you so much for all of the hard work on this. I bookmarked it and will refer to it in the future.
on “The Mathematical Engineering of Deep Learning” ↗It’s not a PyTorch book per se but Dive into Deep Learning by Alex Smola et al. has PyTorch examples. https://d2l.ai/
on “Free Machine Learning crash course from Google” ↗Really depends on where you are coming from. If you are already working in Deep Learning, and super comfortable in some other framework, then- -> Head over to the PyTorch website, and go through the introductory tutorials. -> Go to Papers with Code [0], and start reading and trying out implementing relatively easier research papers. If you are a beginner, then, you can go through resources tha
on “PyTorch 1.10” ↗I second Karpathy's version of cs231n (2016). He's an amazing lecturer. A good alternative to Goodfellow is "Dive into Deep Learning" (https://d2l.ai), which is free and more up-to-date, interactive, and practical, IMO. Videos of a 2019 Berkeley course based on it are available too (https://courses.d2l.ai/berkeley-stat-157/).
on “Ask HN: In 2022, what is the proper way to get into machine/deep learning?” ↗One good starting point with code to follow along with is the chapter on Recommender Systems in "Dive in to Deep Learning." https://d2l.ai/chapter_recommender-systems/index.html
on “Ask HN: What are some good resources on Recommender Systems?” ↗