[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-fchollet--deep-learning-with-python-notebooks":3,"tool-fchollet--deep-learning-with-python-notebooks":64},[4,17,27,35,44,52],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":10,"last_commit_at":41,"category_tags":42,"status":16},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[13,14,15,43],"视频",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":23,"last_commit_at":50,"category_tags":51,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":53,"name":54,"github_repo":55,"description_zh":56,"stars":57,"difficulty_score":23,"last_commit_at":58,"category_tags":59,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,60,43,61,15,62,26,13,63],"数据工具","插件","其他","音频",{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":78,"owner_location":78,"owner_email":79,"owner_twitter":78,"owner_website":80,"owner_url":81,"languages":82,"stars":87,"forks":88,"last_commit_at":89,"license":90,"difficulty_score":91,"env_os":92,"env_gpu":93,"env_ram":94,"env_deps":95,"category_tags":103,"github_topics":78,"view_count":23,"oss_zip_url":78,"oss_zip_packed_at":78,"status":16,"created_at":104,"updated_at":105,"faqs":106,"releases":142},4222,"fchollet\u002Fdeep-learning-with-python-notebooks","deep-learning-with-python-notebooks","Jupyter notebooks for the code samples of the book \"Deep Learning with Python\"","deep-learning-with-python-notebooks 是畅销书《Deep Learning with Python》的官方配套代码库，收录了该书第一版至第三版所有章节的可运行 Jupyter Notebook。它主要解决了读者在学习深度学习理论时“动手难”的问题，将书中复杂的代码示例转化为独立、清晰的实践文件，帮助用户边读边练，快速验证神经网络、分类回归等核心概念。\n\n这套资源特别适合开发者、数据科学家以及希望系统掌握深度学习的学生使用。无论是初学者还是有一定基础的研究人员，都能通过它从零构建知识体系。其独特的技术亮点在于全面支持 Keras 3，允许用户灵活切换 JAX、TensorFlow 或 PyTorch 作为后端框架，极大地提升了代码的兼容性与实验自由度。此外，项目针对 Google Colab 环境进行了优化，无需本地配置复杂依赖即可利用免费 GPU 资源运行大部分代码，同时提供了便捷的 Kaggle 数据集接入指南。建议使用者结合原书阅读，以获得最佳的学习体验。","# Companion notebooks for Deep Learning with Python\n\nThis repository contains Jupyter notebooks implementing the code samples found in the book [Deep Learning with Python, third edition (2025)](https:\u002F\u002Fwww.manning.com\u002Fbooks\u002Fdeep-learning-with-python-third-edition?a_aid=keras&a_bid=76564dff)\nby Francois Chollet and Matthew Watson. In addition, you will also find the legacy notebooks for the [second edition (2021)](https:\u002F\u002Fwww.manning.com\u002Fbooks\u002Fdeep-learning-with-python-second-edition?a_aid=keras&a_bid=76564dff)\nand the [first edition (2017)](https:\u002F\u002Fwww.manning.com\u002Fbooks\u002Fdeep-learning-with-python?a_aid=keras&a_bid=76564dff).\n\nFor readability, these notebooks only contain runnable code blocks and section titles, and omit everything else in the book: text paragraphs, figures, and pseudocode.\n**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.**\n\n## Running the code\n\nWe recommend running these notebooks on [Colab](https:\u002F\u002Fcolab.google), which\nprovides a hosted runtime with all the dependencies you will need. You can also,\nrun these notebooks locally, either by setting up your own Jupyter environment,\nor using Colab's instructions for\n[running locally](https:\u002F\u002Fresearch.google.com\u002Fcolaboratory\u002Flocal-runtimes.html).\n\nBy default, all notebooks will run on Colab's free tier GPU runtime, which\nis sufficient to run all code in this book. Chapter 8-18 chapters will benefit\nfrom a faster GPU if you have a Colab Pro subscription. You can change your\nruntime type using **Runtime -> Change runtime type** in Colab's dropdown menus.\n\n## Choosing a backend\n\nThe code for third edition is written using Keras 3. As such, it can be run with\nJAX, TensorFlow or PyTorch as a backend. To set the backend, update the backend\nin the cell at the top of the colab that looks like this:\n\n```python\nimport os\nos.environ[\"KERAS_BACKEND\"] = \"jax\"\n```\n\nThis must be done only once per session before importing Keras. If you are\nin the middle running a notebook, you will need to restart the notebook session\nand rerun all relevant notebook cells. This can be done in using\n**Runtime -> Restart Session** in Colab's dropdown menus.\n\n## Using Kaggle data\n\nThis book uses datasets and model weights provided by Kaggle, an online Machine\nLearning community and platform. You will need to create a Kaggle login to run\nKaggle code in this book; instructions are given in Chapter 8.\n\nFor chapters that need Kaggle data, you can login to Kaggle once per session\nwhen you hit the notebook cell with `kagglehub.login()`. Alternately,\nyou can set up your Kaggle login information once as Colab secrets:\n\n * Go to https:\u002F\u002Fwww.kaggle.com\u002F and sign in.\n * Go to https:\u002F\u002Fwww.kaggle.com\u002Fsettings and generate a Kaggle API key.\n * Open the secrets tab in Colab by clicking the key icon on the left.\n * Add two secrets, `KAGGLE_USERNAME` and `KAGGLE_KEY` with the username and key\n   you just created.\n\nFollowing this approach you will only need to copy your Kaggle secret key once,\nthough you will need to allow each notebook to access your secrets when running\nthe relevant Kaggle code.\n\n## Table of contents\n\n* [Chapter 2: The mathematical building blocks of neural networks](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter02_mathematical-building-blocks.ipynb)\n* [Chapter 3: Introduction to TensorFlow, PyTorch, JAX, and Keras](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter03_introduction-to-ml-frameworks.ipynb)\n* [Chapter 4: Classification and regression](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter04_classification-and-regression.ipynb)\n* [Chapter 5: Fundamentals of machine learning](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter05_fundamentals-of-ml.ipynb)\n* [Chapter 7: A deep dive on Keras](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter07_deep-dive-keras.ipynb)\n* [Chapter 8: Image Classification](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter08_image-classification.ipynb)\n* [Chapter 9: Convnet architecture patterns](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter09_convnet-architecture-patterns.ipynb)\n* [Chapter 10: Interpreting what ConvNets learn](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter10_interpreting-what-convnets-learn.ipynb)\n* [Chapter 11: Image Segmentation](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter11_image-segmentation.ipynb)\n* [Chapter 12: Object Detection](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter12_object-detection.ipynb)\n* [Chapter 13: Timeseries Forecasting](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter13_timeseries-forecasting.ipynb)\n* [Chapter 14: Text Classification](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter14_text-classification.ipynb)\n* [Chapter 15: Language Models and the Transformer](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter15_language-models-and-the-transformer.ipynb)\n* [Chapter 16: Text Generation](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter16_text-generation.ipynb)\n* [Chapter 17: Image Generation](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter17_image-generation.ipynb)\n* [Chapter 18: Best practices for the real world](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter18_best-practices-for-the-real-world.ipynb)\n","# 《Python深度学习》配套笔记本\n\n本仓库包含 Jupyter 笔记本，实现了弗朗索瓦·肖莱和马修·沃森所著书籍《Python深度学习（第三版，2025）》[1] 中的代码示例。此外，您还可以找到该书 [第二版（2021）][2] 和 [第一版（2017）][3] 的历史版本笔记本。\n\n为了便于阅读，这些笔记本仅包含可运行的代码块和章节标题，省略了书中其他内容：文本段落、图表和伪代码。\n**如果您希望更好地理解内容，建议将笔记本与您的纸质书或电子书对照阅读。**\n\n## 运行代码\n\n我们推荐在 [Colab](https:\u002F\u002Fcolab.google) 上运行这些笔记本，它提供了一个托管运行环境，预装了所有必要的依赖项。您也可以在本地运行这些笔记本，方法是搭建自己的 Jupyter 环境，或者按照 Colab 提供的[本地运行指南](https:\u002F\u002Fresearch.google.com\u002Fcolaboratory\u002Flocal-runtimes.html)进行操作。\n\n默认情况下，所有笔记本都会使用 Colab 免费层级的 GPU 运行时，这足以运行本书中的所有代码。不过，第 8 至 18 章如果使用 Colab Pro 订阅，将能从更快的 GPU 中受益。您可以通过 Colab 下拉菜单中的 **Runtime -> Change runtime type** 来更改运行时类型。\n\n## 选择后端\n\n第三版的代码是使用 Keras 3 编写的，因此可以使用 JAX、TensorFlow 或 PyTorch 作为后端来运行。要设置后端，请在 Colab 笔记本顶部的单元格中更新后端配置，如下所示：\n\n```python\nimport os\nos.environ[\"KERAS_BACKEND\"] = \"jax\"\n```\n\n此操作只需在每次会话中执行一次，在导入 Keras 之前完成即可。如果您正在运行某个笔记本，需要先重启笔记本会话，然后重新运行所有相关单元格。您可以在 Colab 的下拉菜单中选择 **Runtime -> Restart Session** 来实现这一点。\n\n## 使用 Kaggle 数据\n\n本书使用了由在线机器学习社区和平台 Kaggle 提供的数据集和模型权重。要运行书中的 Kaggle 相关代码，您需要创建一个 Kaggle 账号；具体步骤请参见第 8 章。\n\n对于需要 Kaggle 数据的章节，您可以在遇到 `kagglehub.login()` 单元格时，为每个会话登录一次 Kaggle。或者，您可以将 Kaggle 登录信息作为 Colab 秘密保存：\n\n * 访问 https:\u002F\u002Fwww.kaggle.com\u002F 并登录。\n * 进入 https:\u002F\u002Fwww.kaggle.com\u002Fsettings 页面，生成 Kaggle API 密钥。\n * 在 Colab 左侧点击钥匙图标，打开“秘密”选项卡。\n * 添加两个秘密变量 `KAGGLE_USERNAME` 和 `KAGGLE_KEY`，分别填入您刚刚创建的用户名和密钥。\n\n采用这种方法，您只需复制一次 Kaggle 密钥，但在运行涉及 Kaggle 的代码时，仍需允许每个笔记本访问您的秘密。\n\n## 目录\n\n* [第2章：神经网络的数学基础](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter02_mathematical-building-blocks.ipynb)\n* [第3章：TensorFlow、PyTorch、JAX 和 Keras 简介](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter03_introduction-to-ml-frameworks.ipynb)\n* [第4章：分类与回归](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter04_classification-and-regression.ipynb)\n* [第5章：机器学习基础](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter05_fundamentals-of-ml.ipynb)\n* [第7章：深入 Keras](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter07_deep-dive-keras.ipynb)\n* [第8章：图像分类](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter08_image-classification.ipynb)\n* [第9章：卷积神经网络架构模式](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter09_convnet-architecture-patterns.ipynb)\n* [第10章：解读卷积神经网络的学习内容](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter10_interpreting-what-convnets-learn.ipynb)\n* [第11章：图像分割](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter11_image-segmentation.ipynb)\n* [第12章：目标检测](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter12_object-detection.ipynb)\n* [第13章：时间序列预测](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter13_timeseries-forecasting.ipynb)\n* [第14章：文本分类](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter14_text-classification.ipynb)\n* [第15章：语言模型与 Transformer](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter15_language-models-and-the-transformer.ipynb)\n* [第16章：文本生成](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter16_text-generation.ipynb)\n* [第17章：图像生成](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter17_image-generation.ipynb)\n* [第18章：实际应用的最佳实践](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter18_best-practices-for-the-real-world.ipynb)","# deep-learning-with-python-notebooks 快速上手指南\n\n本仓库提供了《Deep Learning with Python》（第三版，2025）书中所有代码示例的 Jupyter Notebook 实现，同时也包含第一版和第二版的遗留笔记。代码基于 **Keras 3** 编写，支持 TensorFlow、PyTorch 或 JAX 作为后端。\n\n## 环境准备\n\n*   **系统要求**：无需本地安装复杂环境，推荐使用浏览器访问。\n*   **前置依赖**：\n    *   一个 Google 账号（用于访问 Colab）。\n    *   （可选）Kaggle 账号：第 8 章及之后的章节需要下载数据集和模型权重，需提前注册 Kaggle 并获取 API Key。\n*   **硬件建议**：\n    *   默认使用 Colab 免费 tier GPU 即可运行大部分代码。\n    *   第 8-18 章涉及大规模训练，若有 Colab Pro 订阅（提供更快的 GPU）体验更佳。\n\n## 安装与运行步骤\n\n本项目推荐直接在云端运行，无需本地配置环境。\n\n### 方法一：使用 Google Colab（推荐）\n\n这是最简便的方式，所有依赖已预装。\n\n1.  访问本仓库的 [目录列表](#章节目录)，点击任意章节链接（例如 \"Chapter 2\"）。\n2.  页面加载后，点击右上角的 **\"在 Colab 中打开\" (Open in Colab)** 图标。\n3.  在 Colab 界面中，点击 **\"连接到\"** 按钮选择 GPU 运行时（如需加速）：\n    *   点击菜单栏 **Runtime (运行时)** -> **Change runtime type (更改运行时类型)**。\n    *   在 **Hardware accelerator (硬件加速器)** 下拉菜单中选择 **GPU**。\n    *   点击 **Save**。\n\n### 方法二：本地运行\n\n如果你希望在本地 Jupyter 环境中运行：\n\n1.  克隆仓库：\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Ffchollet\u002Fdeep-learning-with-python-notebooks.git\n    cd deep-learning-with-python-notebooks\n    ```\n2.  安装依赖（确保已安装 Python 3.9+）：\n    ```bash\n    pip install keras tensorflow torch jax jupyterlab matplotlib pandas numpy\n    ```\n    *(注：国内用户可使用清华源加速安装)*\n    ```bash\n    pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple keras tensorflow torch jax jupyterlab matplotlib pandas numpy\n    ```\n3.  启动 Jupyter：\n    ```bash\n    jupyter lab\n    ```\n\n## 基本使用\n\n### 1. 设置深度学习后端\n\n第三版代码基于 Keras 3，支持切换后端。在运行任何 Notebook 单元格之前，必须在第一个代码块中设置后端环境变量。\n\n**示例：设置为 JAX 后端**\n```python\nimport os\nos.environ[\"KERAS_BACKEND\"] = \"jax\"\n```\n\n**可选后端值**：`\"tensorflow\"`, `\"torch\"`, `\"jax\"`。\n\n> **注意**：此设置必须在导入 `keras` 库之前完成。如果在运行中途修改，必须通过 **Runtime -> Restart Session** 重启会话并重新运行所有单元格。\n\n### 2. 配置 Kaggle 数据访问（针对第 8 章及以后）\n\n若笔记本中包含数据下载代码，需进行身份验证。\n\n**方式 A：单次登录（简单）**\n在包含 `kagglehub.login()` 的单元格运行时，按提示输入账号密码。\n\n**方式 B：配置 Colab Secrets（推荐，只需配置一次）**\n1.  登录 [Kaggle](https:\u002F\u002Fwww.kaggle.com\u002F)，进入 [Settings](https:\u002F\u002Fwww.kaggle.com\u002Fsettings) 生成 API Key。\n2.  在 Colab 左侧栏点击 **钥匙图标 (Secrets)**。\n3.  添加两个密钥：\n    *   Name: `KAGGLE_USERNAME`, Value: 你的 Kaggle 用户名\n    *   Name: `KAGGLE_KEY`, Value: 你的 Kaggle API Key\n4.  开启每个密钥旁边的“允许笔记本访问”开关。\n\n### 3. 运行示例\n\n打开任意章节 Notebook（如 `chapter02_mathematical-building-blocks.ipynb`），按顺序执行代码单元格即可复现书中示例。建议**对照书籍阅读**，因为 Notebook 仅包含可运行代码和标题，省略了书中的文字解释、图表和伪代码。\n\n## 章节目录\n\n*   [第 2 章：神经网络的数学基础](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter02_mathematical-building-blocks.ipynb)\n*   [第 3 章：TensorFlow, PyTorch, JAX 和 Keras 简介](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter03_introduction-to-ml-frameworks.ipynb)\n*   [第 4 章：分类与回归](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter04_classification-and-regression.ipynb)\n*   [第 5 章：机器学习基础](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter05_fundamentals-of-ml.ipynb)\n*   [第 7 章：Keras 深入解析](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter07_deep-dive-keras.ipynb)\n*   [第 8 章：图像分类](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter08_image-classification.ipynb)\n*   [第 9 章：ConvNet 架构模式](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter09_convnet-architecture-patterns.ipynb)\n*   [第 10 章：解读 ConvNet 的学习内容](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter10_interpreting-what-convnets-learn.ipynb)\n*   [第 11 章：图像分割](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter11_image-segmentation.ipynb)\n*   [第 12 章：目标检测](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter12_object-detection.ipynb)\n*   [第 13 章：时间序列预测](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter13_timeseries-forecasting.ipynb)\n*   [第 14 章：文本分类](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter14_text-classification.ipynb)\n*   [第 15 章：语言模型与 Transformer](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter15_language-models-and-the-transformer.ipynb)\n*   [第 16 章：文本生成](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter16_text-generation.ipynb)\n*   [第 17 章：图像生成](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter17_image-generation.ipynb)\n*   [第 18 章：现实世界的最佳实践](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fblob\u002Fmaster\u002Fchapter18_best-practices-for-the-real-world.ipynb)","一名刚入门深度学习的数据科学实习生，正试图复现《Deep Learning with Python》书中的图像分类案例以完成公司原型验证。\n\n### 没有 deep-learning-with-python-notebooks 时\n- **环境配置耗时**：需手动安装 TensorFlow、PyTorch 或 JAX 等复杂依赖，常因版本冲突导致代码无法运行，半天时间浪费在修环境上。\n- **代码转录易错**：必须对照纸质书或电子书逐行手敲代码，极易出现缩进错误或拼写失误，调试过程令人挫败。\n- **框架切换困难**：书中若涉及不同后端（如从 TensorFlow 切到 JAX），需自行摸索修改底层配置，缺乏标准化的切换指引。\n- **数据获取繁琐**：面对需要 Kaggle 数据集的章节，不知如何正确配置 API 密钥，常卡在数据加载第一步无法推进。\n\n### 使用 deep-learning-with-python-notebooks 后\n- **开箱即用**：直接通过 Google Colab 链接一键运行，云端已预装所有依赖，无需本地配置即可立即开始实验。\n- **零误差复现**：直接获取作者官方提供的可执行代码块，确保逻辑与书本完全一致，可将精力集中于理解算法原理而非纠错。\n- **灵活切换后端**：仅需修改单元格顶部的 `KERAS_BACKEND` 环境变量，即可在 JAX、TensorFlow 和 PyTorch 之间无缝切换，轻松对比不同框架表现。\n- **数据流程标准化**：内置清晰的 Kaggle 登录与密钥配置指南，甚至支持 Colab Secrets 管理，让数据加载步骤变得简单且安全。\n\ndeep-learning-with-python-notebooks 将原本数天的环境搭建与代码纠错工作压缩至几分钟，让学习者能真正专注于深度学习核心逻辑的掌握与实践。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffchollet_deep-learning-with-python-notebooks_9fc9d867.png","fchollet","François Chollet","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Ffchollet_3e29281b.png",null,"francois.chollet@gmail.com","https:\u002F\u002Ftwitter.com\u002Ffchollet","https:\u002F\u002Fgithub.com\u002Ffchollet",[83],{"name":84,"color":85,"percentage":86},"Jupyter Notebook","#DA5B0B",100,20022,9047,"2026-04-04T23:24:32","MIT",1,"Linux, macOS, Windows","非必需。Colab 免费版 GPU 即可运行所有代码；第 8-18 章建议使用更快的 GPU（如 Colab Pro 提供），未指定具体型号、显存大小或 CUDA 版本。","未说明",{"notes":96,"python":94,"dependencies":97},"推荐使用 Google Colab 在线运行，已预装所有依赖。第三版代码基于 Keras 3，支持 JAX、TensorFlow 或 PyTorch 后端，需在导入 Keras 前通过环境变量设置。部分章节（第 8 章起）需要 Kaggle 账号及 API 密钥以获取数据集和模型权重。若在本地运行，需自行配置 Jupyter 环境及相应后端依赖。",[98,99,100,101,102],"keras>=3.0","jax","tensorflow","pytorch","kagglehub",[13],"2026-03-27T02:49:30.150509","2026-04-06T14:01:28.716352",[107,112,117,122,127,132,137],{"id":108,"question_zh":109,"answer_zh":110,"source_url":111},19245,"如何在笔记本中找到或获取预训练模型文件（如 cats_and_dogs_small_2.h5）？","该模型文件通常不是直接提供的，而是需要通过运行前面的代码笔记本（例如 5.2-using-convnets-with-small-datasets.ipynb）来训练并生成。请按照章节顺序执行之前的笔记本，即可得到所需的 .h5 权重文件。","https:\u002F\u002Fgithub.com\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fissues\u002F64",{"id":113,"question_zh":114,"answer_zh":115,"source_url":116},19246,"运行代码时遇到 'AttributeError: module 'numpy.random' has no attribute 'randit'' 错误怎么办？","这是一个拼写错误。NumPy 中没有 'randit' 这个函数，正确的函数名是 'randint'（注意末尾有 'n'）。请将代码中的 np.random.randit() 修改为 np.random.randint() 即可解决。","https:\u002F\u002Fgithub.com\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fissues\u002F99",{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},19247,"第 6.3 节中使用的 Jena 气候数据文件 (jena_climate_2009_2016.csv) 在哪里下载？","该数据文件可以直接从以下链接下载：https:\u002F\u002Fs3.amazonaws.com\u002Fkeras-datasets\u002Fjena_climate_2009_2016.csv.zip。虽然原始数据来源是马克斯 - 普朗克生物地球化学研究所的气象站，但书中使用的合并文件托管在 AWS S3 上。","https:\u002F\u002Fgithub.com\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fissues\u002F4",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},19248,"在 Keras 函数式 API 中使用 tf.one_hot() 时报错 'A KerasTensor cannot be used as input to a TensorFlow function' 如何解决？","不能直接在 Keras 模型构建过程中调用原生 TensorFlow 函数（如 tf.one_hot）。需要将其封装在一个自定义的 Keras 层中。解决方案如下：\nclass EmbeddedLayer(keras.Layer):\n    def call(self, x):\n        return tf.one_hot(x, depth=max_tokens)\n\ninputs = keras.Input(shape=(None,), dtype=\"int64\")\nembedded = EmbeddedLayer()(inputs)\n然后继续使用 embedded 作为后续层的输入。","https:\u002F\u002Fgithub.com\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fissues\u002F245",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},19249,"在 Colab 中运行第 11 章代码时，无法从 'tensorflow.keras.layers' 导入 'TextVectorization' 怎么办？","这通常是因为 TensorFlow 版本不匹配。该笔记本旨在配合 TensorFlow 2.6 运行。\n1. 如果你使用的是 TF 2.5（Colab 旧默认版本），请尝试从实验性模块导入：from tensorflow.keras.layers.experimental.preprocessing import TextVectorization。\n2. 或者，将 Colab 运行时升级到 TensorFlow 2.6 或更高版本。","https:\u002F\u002Fgithub.com\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fissues\u002F170",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},19250,"遇到 'module 'keras.optimizers' has no attribute 'RMSprop'' 错误该如何修复？","这是由于 TensorFlow 集成了 Keras 导致的导入路径变化。请将所有形如 from keras import ... 的导入语句更改为 from tensorflow.keras import ...。例如，确保使用 tensorflow.keras.optimizers.RMSprop 而不是单独的 keras 包。","https:\u002F\u002Fgithub.com\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fissues\u002F168",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},19251,"在 6.3 节的时间序列预测中，是否应该删除用于预测的目标变量（温度）列以避免数据泄露？","不需要删除。该任务的目标是预测*未来*的温度值，因此使用目标变量的*过去*值作为输入特征是完全合理且必要的。许多时间序列方法（包括书中使用的基准朴素方法）都仅依赖目标变量的历史数据进行预测，这不构成数据泄露。","https:\u002F\u002Fgithub.com\u002Ffchollet\u002Fdeep-learning-with-python-notebooks\u002Fissues\u002F136",[]]