# pytorch-tutorials-examples-and-books
**Repository Path**: wangyanweida/pytorch-tutorials-examples-and-books
## Basic Information
- **Project Name**: pytorch-tutorials-examples-and-books
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-06-17
- **Last Updated**: 2025-06-17
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# PyTorch tutorials, examples and books

## Table of Contents / 目录:
- [PyTorch tutorials, examples and books](#pytorch-tutorials-examples-and-books)
- [Table of Contents / 目录:](#table-of-contents--目录)
- [PyTorch 1.x tutorials and examples](#pytorch-1x-tutorials-and-examples)
- [Books and slides about PyTorch 书籍、PPT等](#books-and-slides-about-pytorch-书籍ppt等)
- [以下是一些独立的教程](#以下是一些独立的教程)
- [1) PyTorch深度学习:60分钟入门与实战](#1-pytorch深度学习60分钟入门与实战)
- [2) Learning PyTorch with Examples 用例子学习PyTorch](#2-learning-pytorch-with-examples-用例子学习pytorch)
- [How to run? 推荐的运行方式](#how-to-run-推荐的运行方式)
## PyTorch 1.x tutorials and examples
* [0.PyTorch 版本变化及迁移指南](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/0.PyTorch版本变化及迁移指南)
* [1.PyTorch_for_Numpy_Users 给Numpy用户的PyTorch指南](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/1.PyTorch_for_Numpy_users%20给Numpy用户的PyTorch指南)
* [2.PyTorch_Basics PyTorch基础](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/2.PyTorch%20_basics%20PyTorch基础)
* [3.Linear_Regression 线性回归](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/3.Linear_regression%20线性回归)
* [4.Logistic_Regression Logistic 回归](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/4.Logistic_regression%20Logistic回归)
* [5.Optimizer 优化器](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/5.Optimizer%20优化器)
* [6.Neural_Network 神经网络](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/6.Neural_Network%20神经网络)
* [7.Convolutional_Neural_Network(CNN) 卷积神经网络](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/7.Convolutional_Neural_Network(CNN)%20卷积神经网络)
* [8.Famous_CNN 经典的CNN网络](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/8.Famous_CNN%20经典的CNN网络)
* [9.Using_Pretrained_models 使用预训练的模型](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/9.Using_Pretrained_Models%20使用预训练的模型)
* [10.Dataset_and_Dataloader 自定义数据读取](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/10.Dataset_and_Dataloader%20自定义数据读取)
* [11.Custom_Dataset_example 定义自己的数据集](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/11.Custom_Dataset_Example%20定义自己的数据集)
* [12.Visdom_Visualization visdom可视化](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/12.Visdom_Visualization%20visdom可视化)
* [13.Tensorboard_Visualization tensorboard可视化](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/13.Tensorboard_Visualization%20tensorboard可视化)
* [14.Semantic_Segmentation 语义分割](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/14.Semantic_Segmentation%20语义分割)
* [15.Transfer_Learning 迁移学习](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/15.Transfer_Learning%20迁移学习)
* [16.Neural_Style(StyleTransfer) 风格迁移](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/16.Neural_Style(StyleTransfer)%20风格迁移)
* [A.计算机视觉与PyTorch](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/A.%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89%E4%B8%8EPyTorch)
* PyTorch与计算机视觉简要总结
* [Markdown version](https://github.com/bat67/pytorch-tutorials-examples-and-books/blob/master/A.%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89%E4%B8%8EPyTorch/PyTorch%20and%20computer%20vision%20tasks%EF%BC%9Aa%20summary.md)
* [Notebook version](https://github.com/bat67/pytorch-tutorials-examples-and-books/blob/master/A.%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89%E4%B8%8EPyTorch/PyTorch%20and%20computer%20vision%20tasks%EF%BC%9Aa%20summary.ipynb)
* [B.PyTorch概览](https://github.com/bat67/pytorch-tutorials-examples-and-books/blob/master/B.PyTorch概览/PyTorch概览.md)
## [Books and slides about PyTorch 书籍、PPT等](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/books-and-slides)
> Note: some of these are old version; 下面的书籍部分还不是1.x版本。
> 该目录更新可能有延迟,全部资料请看[该文件夹](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/books-and-slides)内文件
* Automatic differentiation in PyTorch.pdf
* A brief summary of the PTDC ’18 PyTorch 1.0 Preview and Promise - Hacker Noon.pdf
* Deep Architectures.pdf
* Deep Architectures.pptx
* Deep Learning Toolkits II pytorch example.pdf
* Deep Learning with PyTorch - Vishnu Subramanian.pdf
* Deep-Learning-with-PyTorch.pdf
* Deep_Learning_with_PyTorch_Quick_Start_Guide.pdf
* First steps towards deep learning with pytorch.pdf
* Introduction to Tensorflow, PyTorch and Caffe.pdf
* pytorch 0.4 - tutorial - 有目录版.pdf
* PyTorch 0.4 中文文档 - 翻译.pdf
* PyTorch 1.0 Bringing research and production together Presentation.pdf
* PyTorch Recipes - A Problem-Solution Approach - Pradeepta Mishra.pdf
* PyTorch under the hood A guide to understand PyTorch internals.pdf
* pytorch-internals.pdf
* PyTorch_tutorial_0.0.4_余霆嵩.pdf
* PyTorch_tutorial_0.0.5_余霆嵩.pdf
* pytorch卷积、反卷积 - download from internet.pdf
* PyTorch深度学习实战 - 侯宜军.epub
* PyTorch深度学习实战 - 侯宜军.pdf
* 深度学习之Pytorch - 廖星宇.pdf
* 深度学习之PyTorch实战计算机视觉 - 唐进民.pdf
* 深度学习入门之PyTorch - 廖星宇(有目录).pdf
* 深度学习框架PyTorch:入门与实践 - 陈云.pdf
* [Udacity: Deep Learning with PyTorch](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/Udacity-Deep-Learning-with-PyTorch)
展开查看
* Part 1: Introduction to PyTorch and using tensors
* Part 2: Building fully-connected neural networks with PyTorch
* Part 3: How to train a fully-connected network with backpropagation on MNIST
* Part 4: Exercise - train a neural network on Fashion-MNIST
* Part 5: Using a trained network for making predictions and validating networks
* Part 6: How to save and load trained models
* Part 7: Load image data with torchvision, also data augmentation
* Part 8: Use transfer learning to train a state-of-the-art image classifier for dogs and cats
* [PyTorch-Zero-To-All](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/books-and-slides/PyTorch-Zero-To-All%20Slides-newest%20from%20Google%20Drive):Slides-newest from Google Drive
展开查看
* Lecture 01_ Overview.pptx
* Lecture 02_ Linear Model.pptx
* Lecture 03_ Gradient Descent.pptx
* Lecture 04_ Back-propagation and PyTorch autograd.pptx
* Lecture 05_ Linear regression in PyTorch way.pptx
* Lecture 06_ Logistic Regression.pptx
* Lecture 07_ Wide _ Deep.pptx
* Lecture 08_ DataLoader.pptx
* Lecture 09_ Softmax Classifier.pptx
* Lecture 10_ Basic CNN.pptx
* Lecture 11_ Advanced CNN.pptx
* Lecture 12_ RNN.pptx
* Lecture 13_ RNN II.pptx
* Lecture 14_ Seq2Seq.pptx
* Lecture 15_ NSML, Smartest ML Platform.pptx
* [Deep Learning Course Slides and Handout - fleuret.org](https://github.com/bat67/pytorch-tutorials-examples-and-books/tree/master/books-and-slides/Deep-Learning-Course-Slides-and-Handout)
展开查看
* 1-1-from-anns-to-deep-learning.pdf
* 1-2-current-success.pdf
* 1-3-what-is-happening.pdf
* 1-4-tensors-and-linear-regression.pdf
* 1-5-high-dimension-tensors.pdf
* 1-6-tensor-internals.pdf
* 2-1-loss-and-risk.pdf
* 2-2-overfitting.pdf
* 2-3-bias-variance-dilemma.pdf
* 2-4-evaluation-protocols.pdf
* 2-5-basic-embeddings.pdf
* 3-1-perceptron.pdf
* 3-2-LDA.pdf
* 3-3-features.pdf
* 3-4-MLP.pdf
* 3-5-gradient-descent.pdf
* 3-6-backprop.pdf
* 4-1-DAG-networks.pdf
* 4-2-autograd.pdf
* 4-3-modules-and-batch-processing.pdf
* 4-4-convolutions.pdf
* 4-5-pooling.pdf
* 4-6-writing-a-module.pdf
* 5-1-cross-entropy-loss.pdf
* 5-2-SGD.pdf
* 5-3-optim.pdf
* 5-4-l2-l1-penalties.pdf
* 5-5-initialization.pdf
* 5-6-architecture-and-training.pdf
* 5-7-writing-an-autograd-function.pdf
* 6-1-benefits-of-depth.pdf
* 6-2-rectifiers.pdf
* 6-3-dropout.pdf
* 6-4-batch-normalization.pdf
* 6-5-residual-networks.pdf
* 6-6-using-GPUs.pdf
* 7-1-CV-tasks.pdf
* 7-2-image-classification.pdf
* 7-3-object-detection.pdf
* 7-4-segmentation.pdf
* 7-5-dataloader-and-surgery.pdf
* 8-1-looking-at-parameters.pdf
* 8-2-looking-at-activations.pdf
* 8-3-visualizing-in-input.pdf
* 8-4-optimizing-inputs.pdf
* 9-1-transposed-convolutions.pdf
* 9-2-autoencoders.pdf
* 9-3-denoising-and-variational-autoencoders.pdf
* 9-4-NVP.pdf
* 10-1-GAN.pdf
* 10-2-Wasserstein-GAN.pdf
* 10-3-conditional-GAN.pdf
* 10-4-persistence.pdf
* 11-1-RNN-basics.pdf
* 11-2-LSTM-and-GRU.pdf
* 11-3-word-embeddings-and-translation.pdf
## 以下是一些独立的教程
### 1) [PyTorch深度学习:60分钟入门与实战](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn)
展开查看
* 什么是PyTorch?(What is PyTorch?)
* [入门](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/What_is_PyTorch/什么是PyTorch.md#%E5%85%A5%E9%97%A8)
* [张量](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/What_is_PyTorch/什么是PyTorch.md#%E5%BC%A0%E9%87%8F)
* [运算](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/What_is_PyTorch/什么是PyTorch.md#%E8%BF%90%E7%AE%97)
* [NumPy桥](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/What_is_PyTorch/什么是PyTorch.md#numpy%E6%A1%A5)
* [将torch的Tensor转化为NumPy数组](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/What_is_PyTorch/什么是PyTorch.md#%E5%B0%86torch%E7%9A%84tensor%E8%BD%AC%E5%8C%96%E4%B8%BAnumpy%E6%95%B0%E7%BB%84)
* [将NumPy数组转化为Torch张量](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/What_is_PyTorch/什么是PyTorch.md#%E5%B0%86numpy%E6%95%B0%E7%BB%84%E8%BD%AC%E5%8C%96%E4%B8%BAtorch%E5%BC%A0%E9%87%8F)
* [CUDA上的张量](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/What_is_PyTorch/什么是PyTorch.md#cuda上的张量)
* Autograd:自动求导
* [张量](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Autograd_Automatic_Differentiation/Autograd%EF%BC%9A自动求导.md#%E5%BC%A0%E9%87%8F)
* [梯度](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Autograd_Automatic_Differentiation/Autograd%EF%BC%9A自动求导.md#%E6%A2%AF%E5%BA%A6)
* 神经网络(Neural Networks)
* [定义网络](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Neural_Networks/神经网络.md#定义网络)
* [损失函数](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Neural_Networks/神经网络.md#损失函数)
* [反向传播](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Neural_Networks/神经网络.md#反向传播)
* [更新权重](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Neural_Networks/神经网络.md#更新权重)
* 训练分类器(Training a Classifier)
* [数据呢?](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Training_a_Classifier/训练分类器.md#数据呢)
* [训练一个图片分类器](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Training_a_Classifier/训练分类器.md#训练一个图片分类器)
* [1.加载并标准化CIFAR10](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Training_a_Classifier/训练分类器.md#1加载并标准化cifar10)
* [2.定义卷积神经网络](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Training_a_Classifier/训练分类器.md#2定义卷积神经网络)
* [3.定义损失函数和优化器](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Training_a_Classifier/训练分类器.md#3定义损失函数和优化器)
* [4.训练网络](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Training_a_Classifier/训练分类器.md#4训练网络)
* [5.使用测试数据测试网络](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Training_a_Classifier/训练分类器.md#5使用测试数据测试网络)
* [在GPU上训练](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Training_a_Classifier/训练分类器.md#在gpu上训练)
* [在多GPU上训练](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Training_a_Classifier/训练分类器.md#在多gpu上训练)
* [接下来要做什么?](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Training_a_Classifier/训练分类器.md#接下来要做什么)
* 选读:数据并行处理(Optional: Data Parallelism)
* [导入和参数](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Optional_Data_Parallelism/数据并行处理.md#导入和参数)
* [虚拟数据集](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Optional_Data_Parallelism/数据并行处理.md#虚拟数据集)
* [简单模型](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Optional_Data_Parallelism/数据并行处理.md#简单模型)
* [创建一个模型和数据并行](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Optional_Data_Parallelism/数据并行处理.md#创建一个模型和数据并行)
* [运行模型](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Optional_Data_Parallelism/数据并行处理.md#运行模型)
* [结果](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Optional_Data_Parallelism/数据并行处理.md#结果)
* [2个GPU](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Optional_Data_Parallelism/数据并行处理.md#2个gpu)
* [3个GPU](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Optional_Data_Parallelism/数据并行处理.md#3个gpu)
* [8个GPU](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Optional_Data_Parallelism/数据并行处理.md#8个gpu)
* [总结](https://github.com/bat67/Deep-Learning-with-PyTorch-A-60-Minute-Blitz-cn/blob/master/Optional_Data_Parallelism/数据并行处理.md#总结)
### 2) [Learning PyTorch with Examples 用例子学习PyTorch](https://github.com/bat67/pytorch-examples-cn)
展开查看
* 张量(Tensors)
* [热身:使用NumPy](https://github.com/bat67/pytorch-examples-cn/tree/master/热身%EF%BC%9A使用NumPy)
* [PyTorch:张量(Tensors)](https://github.com/bat67/pytorch-examples-cn/tree/master/PyTorch%EF%BC%9A张量(Tensors))
* 自动求导(Autograd)
* [PyTorch:自动求导(Autograd)](https://github.com/bat67/pytorch-examples-cn/tree/master/PyTorch%EF%BC%9A自动求导(Autograd))
* [PyTorch:定义自己的自动求导函数](https://github.com/bat67/pytorch-examples-cn/tree/master/PyTorch%EF%BC%9A定义自己的自动求导函数)
* [TensorFlow:静态图](https://github.com/bat67/pytorch-examples-cn/tree/master/TensorFlow%EF%BC%9A静态图)
* `nn`模块(`nn` module)
* [PyTorch:神经网络模块nn](https://github.com/bat67/pytorch-examples-cn/tree/master/PyTorch%EF%BC%9A定制神经网络nn模块)
* [PyTorch:优化模块optim](https://github.com/bat67/pytorch-examples-cn/tree/master/PyTorch%EF%BC%9A优化模块optim)
* [PyTorch:定制神经网络nn模块](https://github.com/bat67/pytorch-examples-cn/tree/master/PyTorch%EF%BC%9A定制神经网络nn模块)
* [PyTorch:控制流和参数共享](https://github.com/bat67/pytorch-examples-cn/tree/master/PyTorch%EF%BC%9A控制流和参数共享)
## How to run? 推荐的运行方式
Some code in this repo is separated in blocks using `#%%`.
A block is as same as a cell in `Jupyter Notebook`. So editors/IDEs supporting this functionality is recommanded.
Such as:
* [VSCode](Functionality) with [Microsoft Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
* [Spyder](https://pypi.org/project/spyder/) with [Anaconda](https://www.anaconda.com/)
* [PyCharm](https://www.jetbrains.com/pycharm/)