
Deep Learning with Python notebooks
Companion Jupyter notebooks with the runnable code from the book Deep Learning with Python.
- Stars
- 20.4k
- Forks
- 9.1k
- Licence
- MIT
- Language
- Jupyter Notebook
- Last update
- 1.1 years ago
- Type
- Learning resource
No commits in over a year — check for forks or alternatives before adopting.
What it is
This repository holds Jupyter notebooks that contain the code samples from the book Deep Learning with Python by Francois Chollet and Matthew Watson. The notebooks include only runnable code blocks and section titles, leaving out the book's text, figures, and pseudocode. The README recommends reading them alongside the book to follow the explanations.
- Run the chapter 2 notebook to see the mathematical building blocks of neural networks in code
- Switch the Keras backend between JAX, TensorFlow, and PyTorch by editing the setup cell
- Open a chapter notebook directly in Google Colab and run it on the free GPU runtime
- Work through the transformer and text generation chapters in chapters 15 and 16
Great for
- Readers who own the third edition of the book and want to run its examples
- Beginners learning deep learning who prefer hands-on code in notebooks
- People who want to try Keras 3 with JAX, TensorFlow, or PyTorch backends
- Students working through chapters on image, text, or time-series models
Not ideal for
- Readers who want a standalone course: the notebooks omit the explanatory text, so the book is needed to follow along
- People without a Colab or local Jupyter setup who need a hosted environment and no instructions for setup are given beyond the README links
- Anyone needing Kaggle-based chapters without a Kaggle account, since the README says those require one
How to get it
- 1
Use it in the browser (or self-host)
Clone the repository
git clone https://github.com/fchollet/deep-learning-with-python-notebooks - 2
Run it
- Open a chapter notebook from the table of contents in Google Colab
- Set the KERAS_BACKEND environment variable in the top cell if you want a backend other than the default
- Add your Kaggle credentials as Colab secrets if the chapter needs Kaggle data
- Run the cells in order, restarting the session if you change the backend
- 3
Get the most out of it
- Read each notebook side by side with the book, since the text is omitted
- Choose a Keras backend (jax, tensorflow, or pytorch) by setting KERAS_BACKEND before importing Keras
- Store Kaggle credentials as Colab secrets so you only enter them once
- Use Colab's Change runtime type menu to select a GPU for the heavier chapters
Downloads
Strengths
- Covers the third edition (2025) of the book with Keras 3 code, plus legacy notebooks for the second and first editions
- Runs on hosted Colab with dependencies provided, so local setup is optional
- Released under the MIT license
Trade-offs
- Notebooks are not self-explanatory; they assume the book is read alongside them
- Some chapters need a Kaggle login and data access, and the README says larger chapters benefit from a Colab Pro GPU
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.