← all repositories
ageron/handson-mlp

The canonical ML workbook swaps TensorFlow for PyTorch

The official PyTorch-flavored code companion to a well-known O'Reilly machine learning textbook.

2k stars Jupyter Notebook Learning
handson-mlp
Velocity · 7d
+2.6
★ / day
Trend
cooling
star history

What it does

This repo is the engine room for Aurélien Géron’s O’Reilly book Hands-On Machine Learning with Scikit-Learn and PyTorch. It contains every example and exercise solution from the first edition, turning printed chapters into runnable Jupyter notebooks. The curriculum covers classical ML with Scikit-Learn and deep learning with PyTorch and Hugging Face.

The interesting bit

It is a deliberate fork in the road from the author’s older TensorFlow/Keras edition (handson-ml3). The notebooks are built to run in Google Colab, so you can break things in a disposable environment without wrestling with local CUDA drivers or dependency hell.

Key highlights

  • Complete, book-aligned code and exercise solutions for a structured ML curriculum.
  • Built on Scikit-Learn, PyTorch, and Hugging Face rather than TensorFlow/Keras.
  • Designed for one-click Colab execution; nbviewer is available for read-only browsing.
  • Targets Python 3.12, with 3.10 and 3.11 supported; 3.13 is explicitly not recommended due to missing library support.

Caveats

  • Colab environments are temporary; the README warns that your work will be deleted after a while, so download anything you want to keep.
  • macOS users may hit SSL certificate errors depending on how Python was installed.
  • The GitHub-native notebook viewer is described as slower, occasionally broken for math rendering, and prone to failing on large notebooks.

Verdict

A good choice if you need a structured, textbook-grade introduction to ML with a current PyTorch stack. Look elsewhere if you are hunting for reference architectures or if you are already past the fundamentals.

Frequently asked

What is ageron/handson-mlp?
The official PyTorch-flavored code companion to a well-known O'Reilly machine learning textbook.
Is handson-mlp open source?
Yes — ageron/handson-mlp is open source, released under the Apache-2.0 license.
What language is handson-mlp written in?
ageron/handson-mlp is primarily written in Jupyter Notebook.
How popular is handson-mlp?
ageron/handson-mlp has 2k stars on GitHub and is currently cooling off.
Where can I find handson-mlp?
ageron/handson-mlp is on GitHub at https://github.com/ageron/handson-mlp.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.