From 510dfe06220a2dfce7a12259183e0ff7841f2290 Mon Sep 17 00:00:00 2001 From: wehub-resource-sync Date: Mon, 13 Jul 2026 10:38:07 +0000 Subject: [PATCH] docs: make Chinese README the default --- README.md | 103 +++++++++++++++++++++++++----------------------------- 1 file changed, 47 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index a57c07e..7edec8d 100644 --- a/README.md +++ b/README.md @@ -1,76 +1,67 @@ -# Companion notebooks for Deep Learning with Python + +> [!NOTE] +> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。 +> [English](./README.en.md) · [原始项目](https://github.com/fchollet/deep-learning-with-python-notebooks) · [上游 README](https://github.com/fchollet/deep-learning-with-python-notebooks/blob/HEAD/README.md) +> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。 -This repository contains Jupyter notebooks implementing the code samples found in the book [Deep Learning with Python, third edition (2025)](https://www.manning.com/books/deep-learning-with-python-third-edition?a_aid=keras&a_bid=76564dff) -by Francois Chollet and Matthew Watson. In addition, you will also find the legacy notebooks for the [second edition (2021)](https://www.manning.com/books/deep-learning-with-python-second-edition?a_aid=keras&a_bid=76564dff) -and the [first edition (2017)](https://www.manning.com/books/deep-learning-with-python?a_aid=keras&a_bid=76564dff). +# 《Python 深度学习》配套 Jupyter 笔记本 -For readability, these notebooks only contain runnable code blocks and section titles, and omit everything else in the book: text paragraphs, figures, and pseudocode. -**If you want to be able to follow what's going on, I recommend reading the notebooks side by side with your copy of the book.** +本仓库包含实现了书中代码示例的 Jupyter 笔记本,对应书籍 [《Python 深度学习》第三版(2025)](https://www.manning.com/books/deep-learning-with-python-third-edition?a_aid=keras&a_bid=76564dff) +,作者为 Francois Chollet 和 Matthew Watson。此外,你还可以找到 [第二版(2021)](https://www.manning.com/books/deep-learning-with-python-second-edition?a_aid=keras&a_bid=76564dff) +以及 [第一版(2017)](https://www.manning.com/books/deep-learning-with-python?a_aid=keras&a_bid=76564dff). +的旧版笔记本。 -## Running the code +为提高可读性,这些笔记本仅包含可运行的代码块和章节标题,省略了书中其余内容:文字段落、插图和伪代码。 +**若想跟上讲解脉络,建议你将笔记本与手中的纸质书或电子书对照阅读。** -We recommend running these notebooks on [Colab](https://colab.google), which -provides a hosted runtime with all the dependencies you will need. You can also, -run these notebooks locally, either by setting up your own Jupyter environment, -or using Colab's instructions for -[running locally](https://research.google.com/colaboratory/local-runtimes.html). +## 运行代码 -By default, all notebooks will run on Colab's free tier GPU runtime, which -is sufficient to run all code in this book. Chapter 8-18 chapters will benefit -from a faster GPU if you have a Colab Pro subscription. You can change your -runtime type using **Runtime -> Change runtime type** in Colab's dropdown menus. +我们建议在 [Colab](https://colab.google), 上运行这些笔记本,它 +提供托管运行时,并已预装你所需的全部依赖。你也可以在本地运行这些笔记本:自行搭建 Jupyter 环境,或按照 Colab 的 +[本地运行](https://research.google.com/colaboratory/local-runtimes.html). +说明操作。 -## Choosing a backend +默认情况下,所有笔记本都会在 Colab 的免费 GPU 运行时上执行,足以运行本书全部代码。若你订阅了 Colab Pro,第 8–18 章在更快的 GPU 上会运行得更顺畅。可在 Colab 下拉菜单中使用 **Runtime -> Change runtime type** 更改运行时类型。 -The code for third edition is written using Keras 3. As such, it can be run with -JAX, TensorFlow or PyTorch as a backend. To set the backend, update the backend -in the cell at the top of the colab that looks like this: +## 选择后端 + +第三版代码使用 Keras 3 编写,因此可选用 JAX、TensorFlow 或 PyTorch 作为后端。要设置后端,请修改 Colab 顶部类似下面示例的单元格中的 backend 设置: ```python import os os.environ["KERAS_BACKEND"] = "jax" ``` -This must be done only once per session before importing Keras. If you are -in the middle running a notebook, you will need to restart the notebook session -and rerun all relevant notebook cells. This can be done in using -**Runtime -> Restart Session** in Colab's dropdown menus. +每个会话在导入 Keras 之前只需执行一次。若你正在运行笔记本中途切换后端,需要重启笔记本会话并重新运行所有相关单元格。可在 Colab 下拉菜单中使用 **Runtime -> Restart Session** 完成重启。 -## Using Kaggle data +## 使用 Kaggle 数据 -This book uses datasets and model weights provided by Kaggle, an online Machine -Learning community and platform. You will need to create a Kaggle login to run -Kaggle code in this book; instructions are given in Chapter 8. +本书使用由 Kaggle——一个在线机器学习(Machine Learning)社区与平台——提供的数据集和模型权重。运行书中的 Kaggle 相关代码前,你需要创建 Kaggle 账号;具体说明见第 8 章。 -For chapters that need Kaggle data, you can login to Kaggle once per session -when you hit the notebook cell with `kagglehub.login()`. Alternately, -you can set up your Kaggle login information once as Colab secrets: +对于需要 Kaggle 数据的章节,当你运行到包含 `kagglehub.login()` 的笔记本单元格时,可在每个会话中登录一次 Kaggle。或者,你也可以将 Kaggle 登录信息一次性配置为 Colab secrets: - * Go to https://www.kaggle.com/ and sign in. - * Go to https://www.kaggle.com/settings and generate a Kaggle API key. - * Open the secrets tab in Colab by clicking the key icon on the left. - * Add two secrets, `KAGGLE_USERNAME` and `KAGGLE_KEY` with the username and key - you just created. + * 访问 https://www.kaggle.com/ 并登录。 + * 访问 https://www.kaggle.com/settings 并生成 Kaggle API 密钥。 + * 点击左侧钥匙图标,打开 Colab 的 secrets 标签页。 + * 添加两个 secrets:`KAGGLE_USERNAME` 和 `KAGGLE_KEY`,分别填入你刚创建的用户名与密钥。 -Following this approach you will only need to copy your Kaggle secret key once, -though you will need to allow each notebook to access your secrets when running -the relevant Kaggle code. +按这种方式,你只需复制一次 Kaggle 密钥,但在运行相关 Kaggle 代码时,仍需允许每个笔记本访问你的 secrets。 -## Table of contents +## 目录 -* [Chapter 2: The mathematical building blocks of neural networks](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter02_mathematical-building-blocks.ipynb) -* [Chapter 3: Introduction to TensorFlow, PyTorch, JAX, and Keras](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter03_introduction-to-ml-frameworks.ipynb) -* [Chapter 4: Classification and regression](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter04_classification-and-regression.ipynb) -* [Chapter 5: Fundamentals of machine learning](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter05_fundamentals-of-ml.ipynb) -* [Chapter 7: A deep dive on Keras](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter07_deep-dive-keras.ipynb) -* [Chapter 8: Image Classification](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter08_image-classification.ipynb) -* [Chapter 9: Convnet architecture patterns](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter09_convnet-architecture-patterns.ipynb) -* [Chapter 10: Interpreting what ConvNets learn](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter10_interpreting-what-convnets-learn.ipynb) -* [Chapter 11: Image Segmentation](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter11_image-segmentation.ipynb) -* [Chapter 12: Object Detection](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter12_object-detection.ipynb) -* [Chapter 13: Timeseries Forecasting](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter13_timeseries-forecasting.ipynb) -* [Chapter 14: Text Classification](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter14_text-classification.ipynb) -* [Chapter 15: Language Models and the Transformer](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter15_language-models-and-the-transformer.ipynb) -* [Chapter 16: Text Generation](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter16_text-generation.ipynb) -* [Chapter 17: Image Generation](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter17_image-generation.ipynb) -* [Chapter 18: Best practices for the real world](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter18_best-practices-for-the-real-world.ipynb) +* [第 2 章:神经网络的数学构建块](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter02_mathematical-building-blocks.ipynb) +* [第 3 章:TensorFlow、PyTorch、JAX 与 Keras 简介](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter03_introduction-to-ml-frameworks.ipynb) +* [第 4 章:分类与回归](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter04_classification-and-regression.ipynb) +* [第 5 章:机器学习基础](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter05_fundamentals-of-ml.ipynb) +* [第 7 章:深入 Keras](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter07_deep-dive-keras.ipynb) +* [第 8 章:图像分类](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter08_image-classification.ipynb) +* [第 9 章:卷积网络(ConvNet)架构模式](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter09_convnet-architecture-patterns.ipynb) +* [第 10 章:解读卷积网络学到了什么](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter10_interpreting-what-convnets-learn.ipynb) +* [第 11 章:图像分割](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter11_image-segmentation.ipynb) +* [第 12 章:目标检测](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter12_object-detection.ipynb) +* [第 13 章:时间序列预测](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter13_timeseries-forecasting.ipynb) +* [第 14 章:文本分类](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter14_text-classification.ipynb) +* [第 15 章:语言模型与 Transformer](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter15_language-models-and-the-transformer.ipynb) +* [第 16 章:文本生成](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter16_text-generation.ipynb) +* [第 17 章:图像生成](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter17_image-generation.ipynb) +* [第 18 章:真实场景最佳实践](https://colab.research.google.com/github/fchollet/deep-learning-with-python-notebooks/blob/master/chapter18_best-practices-for-the-real-world.ipynb)