{"id":13729094,"url":"https://github.com/datawhalechina/thorough-pytorch","last_synced_at":"2025-05-13T23:10:47.946Z","repository":{"id":37368829,"uuid":"391280431","full_name":"datawhalechina/thorough-pytorch","owner":"datawhalechina","description":"PyTorch入门教程，在线阅读地址：https://datawhalechina.github.io/thorough-pytorch/","archived":false,"fork":false,"pushed_at":"2025-02-23T07:32:28.000Z","size":88641,"stargazers_count":2947,"open_issues_count":20,"forks_count":456,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-04-10T20:06:12.551Z","etag":null,"topics":["deep-learning","machine-learning","python","pytorch"],"latest_commit_sha":null,"homepage":"https://datawhalechina.github.io/thorough-pytorch/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datawhalechina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-31T07:03:58.000Z","updated_at":"2025-04-10T02:12:02.000Z","dependencies_parsed_at":"2023-10-02T05:39:02.328Z","dependency_job_id":"213e30c5-59ae-4bd9-bf93-73e130ccce81","html_url":"https://github.com/datawhalechina/thorough-pytorch","commit_stats":{"total_commits":263,"total_committers":22,"mean_commits":"11.954545454545455","dds":0.5665399239543727,"last_synced_commit":"0e15a708079e9c204ccd01121a601fad074584cd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fthorough-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fthorough-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fthorough-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawhalechina%2Fthorough-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datawhalechina","download_url":"https://codeload.github.com/datawhalechina/thorough-pytorch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254042330,"owners_count":22004901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","machine-learning","python","pytorch"],"created_at":"2024-08-03T02:00:54.977Z","updated_at":"2025-05-13T23:10:42.920Z","avatar_url":"https://github.com/datawhalechina.png","language":"Jupyter Notebook","funding_links":[],"categories":["Tutorial","Jupyter Notebook"],"sub_categories":[],"readme":"# 深入浅出PyTorch\n\n\u003e[!IMPORTANT]\n\u003e[在线阅读地址](https://datawhalechina.github.io/thorough-pytorch/) | [配套视频教程](https://www.bilibili.com/video/BV1L44y1472Z) | [智海（国家级AI科教平台）](https://aiplusx.momodel.cn/classroom/class/664bf5db24cff38ad7d2a20e?activeKey=intro)\n\u003e\n\u003e请注意：在线文档更新落后于主仓库更新，建议看source文件夹下的markdown文件\n\n## 一、项目初衷\n\nPyTorch是利用深度学习进行数据科学研究的重要工具，在灵活性、可读性和性能上都具备相当的优势，近年来已成为学术界实现深度学习算法最常用的框架。\n\n考虑到PyTorch的学习兼具理论储备和动手训练，两手都要抓两手都要硬的特点，我们开发了《深入浅出PyTorch》课程，期望以组队学习的形式，帮助大家从入门到熟练掌握PyTorch工具，进而实现自己的深度学习算法。\n\n我们的愿景是：通过组队学习，大家能够掌握由浅入深地PyTorch的基本知识和内容，经过自己的动手实践加深操作的熟练度。同时通过项目实战，充分锻炼编程能力，掌握PyTorch进行深度学习的基本流程，提升解决实际问题的能力。\n\n学习的先修要求是，会使用Python编程，了解包括神经网络在内的机器学习算法，勤于动手实践。\n\n《深入浅出PyTorch》是一个系列，一共有三个部分。已经上线的是本系列的第一、二部分，后续会不断更新《深入浅出PyTorch》（下），给出更贴合实际应用的实战案例。\n\n## 二、内容简介\n- 第零章：前置知识（选学）\n  - 人工智能简史\n  - 相关评价指标\n  - 常用包的学习\n  - Jupyter相关操作\n- 第一章：PyTorch的简介和安装\n  - PyTorch简介\n  - PyTorch的安装\n  - PyTorch相关资源简介\n- 第二章：PyTorch基础知识\n  - 张量及其运算\n  - 自动求导简介\n  - 并行计算、CUDA和cuDNN简介\n- 第三章：PyTorch的主要组成模块\n  - 思考：完成一套深度学习流程需要哪些关键环节\n  - 基本配置\n  - 数据读入\n  - 模型构建\n  - 损失函数\n  - 优化器\n  - 训练和评估\n  - 可视化\n- 第四章：PyTorch基础实战\n  - 基础实战——Fashion-MNIST时装分类\n  - 基础实战——果蔬分类实战（notebook）\n- 第五章：PyTorch模型定义\n  - 模型定义方式\n  - 利用模型块快速搭建复杂网络\n  - 模型修改\n  - 模型保存与读取\n- 第六章：PyTorch进阶训练技巧\n  - 自定义损失函数\n  - 动态调整学习率\n  - 模型微调-torchvision\n  - 模型微调-timm\n  - 半精度训练\n  - 数据扩充\n  - 超参数的修改及保存\n  - PyTorch模型定义与进阶训练技巧\n- 第七章：PyTorch可视化\n  - 可视化网络结构\n  - 可视化CNN卷积层\n  - 使用TensorBoard可视化训练过程\n  - 使用wandb可视化训练过程\n  - 使用SwanLab可视化训练过程\n- 第八章：PyTorch生态简介\n  - 简介\n  - 图像—torchvision\n  - 视频—PyTorchVideo\n  - 文本—torchtext\n  - 音频-torchaudio\n- 第九章：模型部署\n  - 使用ONNX进行部署并推理\n- 第十章：常见网络代码的解读(推进中)\n  - 计算机视觉\n    - 图像分类\n      - ResNet源码解读\n      - Swin Transformer源码解读\n      - Vision Transformer源码解读\n      - RNN源码解读\n      - LSTM源码解读及其实战\n    - 目标检测\n      - YOLO系列解读（与MMYOLO合作）\n    - 图像分割\n  - 自然语言处理\n    - RNN源码解读\n  - 音频处理\n  - 视频处理\n  - 其他\n  - \n\n## 三、人员安排\n| 成员\u0026nbsp; | 个人简介                                            | 个人主页                                           |\n| --------------- | --------------------------------------------------- | -------------------------------------------------- |\n|   牛志康   | DataWhale成员，西安电子科技大学本科生 | [[知乎](https://www.zhihu.com/people/obeah-82)][[个人主页](https://nofish-528.github.io/)] |\n|   李嘉骐   | DataWhale成员，清华大学研究生 | [[知乎](https://www.zhihu.com/people/li-jia-qi-16-9/posts)] |\n|    刘洋    | Datawhale成员，中国科学院数学与系统科学研究所研究生 | [[知乎](https://www.zhihu.com/people/ming-ren-19-34/asks)]   |\n|   陈安东   | DataWhale成员，哈尔滨工业大学研究生                   | [[个人主页](https://andongblue.github.io/chenandong.github.io/)] |\n\n教程贡献情况（已上线课程内容）：\n\n李嘉骐：第三章；第四章；第五章；第六章；第七章；第八章；内容整合\n\n牛志康：第一章；第三章；第六章；第七章；第八章，第九章，第十章；文档部署\n\n刘洋：第二章；第三章\n\n陈安东：第二章；第三章；第七章\n\n## 四、 课程编排与配套视频\n\u003cdetails\u003e\n\n部分章节直播讲解请观看B站回放（持续更新）：https://www.bilibili.com/video/BV1L44y1472Z\n\n- 课程编排：\n  深入浅出PyTorch分为三个阶段：PyTorch深度学习基础知识、PyTorch进阶操作、PyTorch案例分析。\n\n- 使用方法:\n\n  我们的课程内容都以markdown格式或jupyter notebook的形式保存在本仓库内。除了多看加深课程内容的理解外，最重要的还是动手练习、练习、练习\n\n- 组队学习安排:\n\n  第一部分：第一章到第四章，学习周期：10天；\n\n  第二部分：第五章到第八章，学习周期：11天\n\u003c/details\u003e\n\n## 五、关于贡献\n\u003cdetails\u003e \n\n本项目使用`Forking`工作流，具体参考[atlassian文档](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow)大致步骤如下：\n\n1. 在GitHub上Fork本仓库\n2. Clone Fork后的个人仓库\n3. 设置`upstream`仓库地址，并禁用`push`\n4. 使用分支开发，课程分支名为`lecture{#NO}`，`#NO`保持两位，如`lecture07`，对应课程目录\n5. PR之前保持与原始仓库的同步，之后发起PR请求\n\n命令示例：\n\n```shell\n# fork\n# clone\ngit clone git@github.com:USERNAME/thorough-pytorch.git\n# set upstream\ngit remote add upstream git@github.com:datawhalechina/thorough-pytorch.git\n# disable upstream push\ngit remote set-url --push upstream DISABLE\n# verify\ngit remote -v\n# some sample output:\n# origin\tgit@github.com:NoFish-528/thorough-pytorch.git (fetch)\n# origin\tgit@github.com:NoFish-528/thorough-pytorch.git (push)\n# upstream\tgit@github.com:datawhalechina/thorough-pytorch.git (fetch)\n# upstream\tDISABLE (push)\n# do your work\ngit checkout -b lecture07\n# edit and commit and push your changes\ngit push -u origin lecture07\n# keep your fork up to date\n## fetch upstream main and merge with forked main branch\ngit fetch upstream\ngit checkout main\ngit merge upstream/main\n## rebase brach and force push\ngit checkout lecture07\ngit rebase main\ngit push -f\n```\n\n### Commit Message\n\n提交信息使用如下格式：`\u003ctype\u003e: \u003cshort summary\u003e`\n\n```\n\u003ctype\u003e: \u003cshort summary\u003e\n  │            │\n  │            └─⫸ Summary in present tense. Not capitalized. No period at the end.\n  │\n  └─⫸ Commit Type: [docs #NO]:others\n```\n\n`others`包括非课程相关的改动，如本`README.md`中的变动，`.gitignore`的调整等。\n\u003c/details\u003e\n\n## 六、更新计划\n\u003cdetails\u003e\n\n| 内容 | 更新时间 |内容|\n| :---- | :---- |:----:|\n|apex|  |apex的简介和使用|\n|模型部署|  |Flask部署PyTorch模型|\n|TorchScript|  |TorchScript|\n|并行训练| |并行训练 |\n|模型预训练 - torchhub| |torchhub的简介和使用方法|\n|目标检测 - SSD|  |SSD的简介和实现|\n|目标检测 - RCNN系列|  |Fast-RCNN \u0026 Mask-RCNN|\n|目标检测 - DETR|  |DETR的实现|\n|图像分类 - GoogLeNet|  |GoogLeNet的介绍与实现|\n|图像分类 - MobileNet系列|  |MobileNet系列介绍与实现|\n|图像分类 - GhostNet|  |GhostNet代码讲解|\n|生成式对抗网络 - 生成手写数字实战|  |生成数字并可视化|\n|生成式对抗网络 - DCGAN|  ||\n|风格迁移 - StyleGAN|  ||\n|生成网络 - VAE|  ||\n|图像分割 Deeplab系列|  |Deeplab系列代码讲解|\n|自然语言处理 LSTM|  |LSTM情感分析实战|\n|自然语言处理 Transformer|  ||\n|自然语言处理 BERT|  ||\n|视频| | 待定|\n|音频| | 待定|\n|自定义CUDA扩展和算子|||\n\u003c/details\u003e\n\n## 七、鸣谢与反馈\n- 非常感谢DataWhale成员 叶前坤 @[PureBuckwheat](https://github.com/PureBuckwheat) 和 胡锐锋 @[Relph1119](https://github.com/Relph1119) 对文档的细致校对！\n- 如果有任何想法可以联系我们DataWhale也欢迎大家多多提出issue。\n- 特别感谢以下为教程做出贡献的同学！并特别感谢MMYOLO的贡献者们！\n\n\n\u003ca href=\"https://github.com/datawhalechina/thorough-pytorch/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=datawhalechina/thorough-pytorch\" /\u003e\n\u003c/a\u003e\n\nMade with [contrib.rocks](https://contrib.rocks).\n\n\n## 八、关注我们\n\u003cdiv align=center\u003e\u003cimg src=\"https://raw.githubusercontent.com/datawhalechina/easy-rl/master/docs/res/qrcode.jpeg\" width = \"250\" height = \"270\" alt=\"Datawhale是一个专注AI领域的开源组织，以“for the learner，和学习者一起成长”为愿景，构建对学习者最有价值的开源学习社区。关注我们，一起学习成长。\"\u003e\u003c/div\u003e\n\n## LICENSE\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/\"\u003e\u003cimg alt=\"知识共享许可协议\" style=\"border-width:0\" src=\"https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-lightgrey\" /\u003e\u003c/a\u003e\u003cbr /\u003e本作品采用\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/\"\u003e知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议\u003c/a\u003e进行许可。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatawhalechina%2Fthorough-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatawhalechina%2Fthorough-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatawhalechina%2Fthorough-pytorch/lists"}