提交 86a3cbe4 编写于 作者: W wizardforcel

2019-02-22 11:20:27

上级 976cba10
......@@ -18,54 +18,3 @@ PyTorch 是一个针对深度学习, 并且使用 GPU 和 CPU 来优化的 tenso
* [@咸鱼](https://github.com/Watermelon233)
* [@片刻](https://github.com/jiangzhonglian)
## 贡献者
| 标题 | 翻译 | 校对 |
| --- | --- | --- |
| **文档部分** | - | - |
| **介绍** | - | - |
| [自动求导机制](http://pytorch.apachecn.org/cn/docs/0.3.0/notes/autograd.html#) | [@那伊抹微笑](https://github.com/wangyangting) | [@Twinkle](https://github.com/kemingzeng) |
| [广播语义](http://pytorch.apachecn.org/cn/docs/0.3.0/notes/broadcasting.html) | [@谢家柯](https://github.com/kelisiya) | [@Twinkle](https://github.com/kemingzeng) |
| [CUDA 语义](http://pytorch.apachecn.org/cn/docs/0.3.0/notes/cuda.html) | [@Chris](https://github.com/Chriskuei) | [@Twinkle](https://github.com/kemingzeng) |
| [扩展 PyTorch](http://pytorch.apachecn.org/cn/docs/0.3.0/notes/extending.html) | [@那伊抹微笑](https://github.com/wangyangting) | [@Twinkle](https://github.com/kemingzeng) |
| [多进程的最佳实践](http://pytorch.apachecn.org/cn/docs/0.3.0/notes/multiprocessing.html) | [@冯斐](https://github.com/ata123) | [@Twinkle](https://github.com/kemingzeng) |
| [序列化语义](http://pytorch.apachecn.org/cn/docs/0.3.0/notes/serialization.html) | [@胡东瑶](https://github.com/psubnwell) | [@Twinkle](https://github.com/kemingzeng) |
| **PACKAGE 参考** | - | - |
| [torch](http://pytorch.apachecn.org/cn/docs/0.3.0/torch.html) | [@那伊抹微笑](https://github.com/wangyangting) @yudong [@小瑶](https://github.com/chenyyx) [@片刻](https://github.com/jiangzhonglian) [@李雨龙](https://github.com/sawyer7246) [@K](https://github.com/YaoSam) [@devin](https://github.com/EVYang1992) [@张假飞](https://github.com/nothingcouldbebetter) [@rickllyxu](https://github.com/rickllyxu) | [@张假飞](https://github.com/nothingcouldbebetter) [@飞龙](https://github.com/wizardforcel) |
| [torch.Tensor](http://pytorch.apachecn.org/cn/docs/0.3.0/tensors.html) | [@Sylvester](https://github.com/coboe) [@那伊抹微笑](https://github.com/wangyangting) | [@Sariel](https://github.com/Cyril-CC) |
| [torch.sparse](http://pytorch.apachecn.org/cn/docs/0.3.0/sparse.html) | [@王帅](https://github.com/sirwangshuai) | [@Timor](https://github.com/timors) |
| [torch.Storage](http://pytorch.apachecn.org/cn/docs/0.3.0/storage.html) | @FanXing | [@Timor](https://github.com/timors) |
| [torch.nn](http://pytorch.apachecn.org/cn/docs/0.3.0/nn.html) | [@小王子](https://github.com/VPrincekin) [@那伊抹微笑](https://github.com/wangyangting) [@Yang Shun](https://github.com/busyboxs) [@Zhu Yansen](https://github.com/zhuyansen) [@woaichipinngguo](https://github.com/woaichipinngguo) [@buldajs](https://github.com/buldajs) [@吉思雨](https://github.com/swardsman) [@王云峰](https://github.com/vra) [@李雨龙](https://github.com/sawyer7246) [@Yucong Zhu](https://github.com/Eadral) [@林嘉应](https://github.com/garry1ng) [@QianFanCe](https://github.com/QianFanCe) [@dabney777](https://github.com/dabney777) [@Alex](https://github.com/jizg) [@SiKai Yao](https://github.com/Mabinogiysk) [@小乔](https://github.com/QiaoXie) @laihongchang @噼里啪啦嘣 [@BarrettLi](https://github.com/BarrettLi) [@KrokYin](https://github.com/KrokYin) [@MUSK1881](https://github.com/JoinsenQ) | [@clown9804](http://community.apachecn.org/?/people/clown9804) [@飞龙](https://github.com/wizardforcel) |
| [torch.optim](http://pytorch.apachecn.org/cn/docs/0.3.0/optim.html) | [@于增源](https://github.com/ZengyuanYu) | [@青梅往事](https://github.com/2556120684) |
| [torch.autograd](http://pytorch.apachecn.org/cn/docs/0.3.0/autograd.html) | [@ZhenLei Xu](https://github.com/HadXu) | [@青梅往事](https://github.com/2556120684) |
| [torch.distributions](http://pytorch.apachecn.org/cn/docs/0.3.0/distributions.html) | [@叶舒泉](https://github.com/pleaseconnectwifi) | [@smilesboy](https://github.com/smilesboy) [@Charles Xu](https://github.com/the0demiurge) |
| [torch.multiprocessing](http://pytorch.apachecn.org/cn/docs/0.3.0/multiprocessing.html) | @夜神月 | [@smilesboy](https://github.com/smilesboy) |
| [torch.distributed](http://pytorch.apachecn.org/cn/docs/0.3.0/distributed.html) | [@Mu Wu9527](https://github.com/yichuan9527) | [@smilesboy](https://github.com/smilesboy) |
| [torch.legacy](http://pytorch.apachecn.org/cn/docs/0.3.0/legacy.html) | [@那伊抹微笑](https://github.com/wangyangting) | [@smilesboy](https://github.com/smilesboy) |
| [torch.cuda](http://pytorch.apachecn.org/cn/docs/0.3.0/cuda.html) | [@谈笑风生](https://github.com/zhu1040028623) | [@smilesboy](https://github.com/smilesboy) |
| [torch.utils.ffi](http://pytorch.apachecn.org/cn/docs/0.3.0/ffi.html) | [@之茗](https://github.com/mayuanucas) | [*@aleczhang*](http://community.apachecn.org/?/people/aleczhang) |
| [torch.utils.data](http://pytorch.apachecn.org/cn/docs/0.3.0/data.html) | [@之茗](https://github.com/mayuanucas) | [*@aleczhang*](http://community.apachecn.org/?/people/aleczhang) |
| [torch.utils.model_zoo](http://pytorch.apachecn.org/cn/docs/0.3.0/model_zoo.html) | [@之茗](https://github.com/mayuanucas) | [*@aleczhang*](http://community.apachecn.org/?/people/aleczhang) |
| [torch.onnx](http://pytorch.apachecn.org/cn/docs/0.3.0/onnx.html) | [@Haofan Wang](https://github.com/haofanwang) | [*@aleczhang*](http://community.apachecn.org/?/people/aleczhang) |
| **TORCHVISION 参考** | - | - |
| [torchvision](http://pytorch.apachecn.org/cn/docs/0.3.0/torchvision/index.html) | [@那伊抹微笑](https://github.com/wangyangting) @dawenzi123 [@LeeGeong](https://github.com/LeeGeong) @liandongze | [@咸鱼](https://github.com/Watermelon233) |
| **教程部分** | - | - |
| **初学者教程** | - | - |
| [PyTorch 深度学习: 60 分钟极速入门教程](http://pytorch.apachecn.org/cn/tutorials/beginner/deep_learning_60min_blitz.html) | [@小王子](https://github.com/VPrincekin) | [@李子文](https://github.com/liziwenzzzz) |
| [为以前 Torch 用户提供的 Pytorch 教程](http://pytorch.apachecn.org/cn/tutorials/beginner/former_torchies_tutorial.html) | @unknown | [@bringtree](https://github.com/bringtree) |
| [跟着例子学习 PyTorch](http://pytorch.apachecn.org/cn/tutorials/beginner/pytorch_with_examples.html) | [@yongjay13](https://github.com/yongjay13) [@speedmancs](https://github.com/speedmancs) | [@bringtree](https://github.com/bringtree) |
| [迁移学习教程](http://pytorch.apachecn.org/cn/tutorials/beginner/transfer_learning_tutorial.html) | [@Sylvester](https://github.com/coboe) | [@Archie Yu](https://github.com/archie-yu) |
| [数据加载和处理教程](http://pytorch.apachecn.org/cn/tutorials/beginner/data_loading_tutorial.html) | [@distant1219](https://github.com/distant1219) | [@bringtree](https://github.com/bringtree) |
| [Deep Learning for NLP with Pytorch](http://pytorch.apachecn.org/cn/tutorials/beginner/deep_learning_nlp_tutorial.html) | [@JingTao](https://github.com/jingwangfei) [@friedhelm739](https://github.com/friedhelm739) | |
| **中级教程** | - | - |
| [Classifying Names with a Character-Level RNN](http://pytorch.apachecn.org/cn/tutorials/intermediate/char_rnn_classification_tutorial.html#) | [@孙永杰](https://github.com/yongjay13) | |
| [Generating Names with a Character-Level RNN](http://pytorch.apachecn.org/cn/tutorials/intermediate/char_rnn_generation_tutorial.html) | [@jianchengss](https://github.com/jianchengss) | |
| [Translation with a Sequence to Sequence Network and Attention](http://pytorch.apachecn.org/cn/tutorials/intermediate/seq2seq_translation_tutorial.html) | [@EWilsen](http://community.apachecn.org/?/people/EWilsen) | |
| [Reinforcement Learning (DQN) tutorial](http://pytorch.apachecn.org/cn/tutorials/intermediate/reinforcement_q_learning.html) | [@Lisanaaa](https://github.com/Lisanaaa) | |
| [Writing Distributed Applications with PyTorch](http://pytorch.apachecn.org/cn/tutorials/intermediate/dist_tuto.html) | [@Sylvester](https://github.com/coboe) | |
| [Spatial Transformer Networks Tutorial](http://pytorch.apachecn.org/cn/tutorials/intermediate/spatial_transformer_tutorial.html) | [@Twinkle](https://github.com/kemingzeng) | |
| **高级教程** | - | - |
| [Neural Transfer with PyTorch](http://pytorch.apachecn.org/cn/tutorials/advanced/neural_style_tutorial.html) | [@Twinkle](https://github.com/kemingzeng) | |
| [Creating extensions using numpy and scipy](http://pytorch.apachecn.org/cn/tutorials/advanced/numpy_extensions_tutorial.html) | [@飞龙](https://github.com/wizardforcel) | |
| [Transfering a model from PyTorch to Caffe2 and Mobile using ONNX](http://pytorch.apachecn.org/cn/tutorials/advanced/super_resolution_with_caffe2.html) | [@片刻](https://github.com/jiangzhonglian) | |
| [Custom C extensions for pytorch](http://pytorch.apachecn.org/cn/tutorials/advanced/c_extension.html) | [@飞龙](https://github.com/wizardforcel) | |
# Automatic differentiation package - torch.autograd
> 译者:[@ZhenLei Xu](https://github.com/HadXu)
>
> 校对者:[@青梅往事](https://github.com/2556120684)
torch.autograd 提供了类和函数用来对任意标量函数进行求导.只需要对已有的代码进行微小的改变-只需要将所有的 tensors 包含在 `Variable` 对象中即可.
```py
......
# 自动求导: 自动微分
> 译者:[@小王子](https://github.com/VPrincekin)
>
> 校对者:[@李子文](https://github.com/liziwenzzzz)
PyTorch 中所有神经网络的核心是 `autograd` 自动求导包. 我们先来简单介绍一下, 然后我们会去训练我们的第一个神经网络.
`autograd` 自动求导包针对张量上的所有操作都提供了自动微分操作. 这是一个逐个运行的框架, 这意味着您的反向传播是由您的代码如何运行来定义的, 每个单一的迭代都可以不一样.
......
# 训练一个分类器
> 译者:[@小王子](https://github.com/VPrincekin)
>
> 校对者:[@李子文](https://github.com/liziwenzzzz)
就是这个, 你已经看到了如何定义神经网络, 计算损失并更新网络的权重.
现在你可能会想,
......
# 可选: 数据并行
> 译者:[@小王子](https://github.com/VPrincekin)
>
> 校对者:[@李子文](https://github.com/liziwenzzzz)
**作者**: [Sung Kim](https://github.com/hunkim)[Jenny Kang](https://github.com/jennykang)
在这个教程中, 我们将会学习如何在多个GPU上使用 `DataParallel` .
......
# 神经网络
> 译者:[@小王子](https://github.com/VPrincekin)
>
> 校对者:[@李子文](https://github.com/liziwenzzzz)
神经网络可以使用 `torch.nn` 包构建.
`autograd` 实现了反向传播功能, 但是直接用来写深度学习的代码在很多情况下还是稍显复杂, `torch.nn` 是专门为神经网络设计的模块化接口. `nn` 构建于 `Autograd` 之上, 可用来定义和运行神经网络. `nn.Module``nn` 中最重要的类, 可把它看成是一个网络的封装, 包含网络各层定义以及 `forward` 方法, 调用 `forward(input)` 方法, 可返回前向传播的结果.
......
# PyTorch 是什么?
> 译者:[@小王子](https://github.com/VPrincekin)
>
> 校对者:[@李子文](https://github.com/liziwenzzzz)
它是一个基于 Python 的科学计算包, 其主要是为了解决两类场景:
* NumPy 的替代品, 以使用 GPU 的强大加速功能
......
# 为 pytorch 自定义 C 扩展
> 译者:[@飞龙](https://github.com/wizardforcel)
**作者**: [Soumith Chintala](http://soumith.ch)
## 第一步. 准备你的 C 代码
......
# 用字符级RNN分类名称
> 译者:[@孙永杰](https://github.com/yongjay13)
**作者**: [Sean Robertson](https://github.com/spro/practical-pytorch)
我们将建立和训练一个基本的字符级RNN进行分类单词. 字符级别的RNN将单词读为一系列字符 - 在每个步骤输出一个预测和“隐藏状态”, 将先前的隐藏状态作为下一步的输入. 我们采取最后的预测作为输出,即该单词属于哪一类.
......
# 基与字符级RNN(Char-RNN)的人名生成
> 译者:[@jianchengss](https://github.com/jianchengss)
**作者**: [Sean Robertson](https://github.com/spro/practical-pytorch)
[上一个教程](char_rnn_classification_tutorial.html) 里我们使用RNN把名字分类到它所属的语言中, 这次我们改变一下来学习从语言中生成名字.
......
# torch.cuda
> 译者:[@谈笑风生](https://github.com/zhu1040028623)
>
> 校对者:[@smilesboy](https://github.com/smilesboy)
这个包增加了对 CUDA tensor (张量) 类型的支持,利用 GPUs 计算实现了与 CPU tensors 相同的类型.
这个是 lazily initialized (懒加载,延迟加载), 所以你可以一直导入它,并且可以用 `is_available()` 来判断 你的系统是否支持 CUDA.
......
# torch.utils.data
> 译者:[@之茗](https://github.com/mayuanucas)
>
> 校对者:[@aleczhang](http://community.apachecn.org/?/people/aleczhang)
```py
class torch.utils.data.Dataset
```
......
# 数据加载和处理教程
> 译者:[@distant1219](https://github.com/distant1219)
>
> 校对者:[@bringtree](https://github.com/bringtree)
**作者**: [Sasank Chilamkurthy](https://chsasank.github.io)
在解决机器学习问题时, 我们需要付出很多努力来准备数据, 为了使代码更具可读性, PyTorch提供了许多工具来使数据加载变得简单易行. 在本教程中, 我们将要学习如何对 一个重要的数据集进行加载、预处理数据增强.
......
# torchvision.datasets
> 译者:[@那伊抹微笑](https://github.com/wangyangting)、@dawenzi123、[@LeeGeong](https://github.com/LeeGeong)、@liandongze
>
> 校对者:[@咸鱼](https://github.com/Watermelon233)
所有的数据集都是 [`torch.utils.data.Dataset`](../data.html#torch.utils.data.Dataset "torch.utils.data.Dataset") 类的子类, 也就是说, 他们内部都实现了 `__getitem__``__len__` 这两个方法. 同时, 他们也都可以传递给类 [`torch.utils.data.Dataset`](../data.html#torch.utils.data.Dataset "torch.utils.data.Dataset"), 它可以使用 `torch.multiprocessing` 工作器来并行的加载多个样本.
示例:
......
# PyTorch 深度学习: 60 分钟极速入门教程
> 译者:[@小王子](https://github.com/VPrincekin)
>
> 校对者:[@李子文](https://github.com/liziwenzzzz)
**Author**: [Soumith Chintala](http://soumith.ch)
本教程的目标:
......
# 针对NLP的Pytorch深度学习
> 译者:[@JingTao](https://github.com/jingwangfei)、[@friedhelm739](https://github.com/friedhelm739)
**作者**: [Robert Guthrie](https://github.com/rguthrie3/DeepLearningForNLPInPytorch)
本教程将带你浏览基于Pytorch深度学习编程的核心思想.其中很多思想(例如计算图形抽象化以及自动求导) 并不是Pytorch特有的,他们和任何深度学习工具包都是相关的.
......
# Writing Distributed Applications with PyTorch
> 译者:[@Sylvester](https://github.com/coboe)
**Author**: [Séb Arnold](http://seba1511.com)
In this short tutorial, we will be going over the distributed package of PyTorch. We’ll see how to set up the distributed setting, use the different communication strategies, and go over some the internals of the package.
......
# Distributed communication package - torch.distributed
> 译者:[@Mu Wu9527](https://github.com/yichuan9527)
>
> 校对者:[@smilesboy](https://github.com/smilesboy)
torch.distributed 提供类似 MPI 的前向运算机制, 支持在多台机的网络中交换数据. 支持不同的后段和初始化方法.
目前torch.distributed支持三个后端, 每个都有不同的功能. 下表显示哪些功能可用于 CPU/CUDA 张量. 只有在设备上编译安装PyTorch, 才能在MPI的设备上支持cuda.
......
# Probability distributions - torch.distributions
> 译者:[@叶舒泉](https://github.com/pleaseconnectwifi)
>
> 校对者:[@smilesboy](https://github.com/smilesboy)、[@Charles Xu](https://github.com/the0demiurge)
`distributions` 统计分布包中含有可自定义参数的概率分布和采样函数.
当概率密度函数对其参数可微时, 可以使用 `log_prob()` 方法来实施梯度方法 Policy Gradient. 它的一个基本方法是REINFORCE规则:
......
# torch.utils.ffi
> 译者:[@之茗](https://github.com/mayuanucas)
>
> 校对者:[@aleczhang](http://community.apachecn.org/?/people/aleczhang)
```py
torch.utils.ffi.create_extension(name, headers, sources, verbose=True, with_cuda=False, package=False, relative_to='.', **kwargs)
```
......
# Autograd (自动求导)
> 译者:@unknown
>
> 校对者:[@bringtree](https://github.com/bringtree)
Autograd 现在是 torch 自动微分的核心包 . 它是使用基于 tape 的系统来进行自动微分的.
在前向阶段, autograd tape 会记住它执行的所有操作, 在反向阶段, 它将重放这些操作
......
# nn package
> 译者:@unknown
>
> 校对者:[@bringtree](https://github.com/bringtree)
我们重新设计了 nn package, 以便与 autograd 完全集成. 让我们来回顾一下这些变化.
**用 autograd 替换 containers:**
......
# Multi-GPU examples
> 译者:@unknown
>
> 校对者:[@bringtree](https://github.com/bringtree)
数据并行是指当我们将 mini-batch 的样本分成更小的 mini-batches, 并行地计算每个更小的 mini-batches.
数据并行通过使用 `torch.nn.DataParallel` 实现. 我们可以用 `DataParallel` 包装一个模块, 然后它将在 batch 维度(默认是0轴) 平分数据给多个 GPUs 进行并行计算.
......
# Tensors
> 译者:@unknown
>
> 校对者:[@bringtree](https://github.com/bringtree)
Tensors 在 PyTorch 中的操作方式 与 Torch 几乎完全相同.
用未初始化的内存创建一个大小为 (5 x 7) 的 tensor:
......
# PyTorch for former Torch users
> 译者:@unknown
>
> 校对者:[@bringtree](https://github.com/bringtree)
**Author**: [Soumith Chintala](http://soumith.ch)
在本教程中, 你将学习到以下内容:
......
# Legacy package - torch.legacy
> 译者:[@那伊抹微笑](https://github.com/wangyangting)
>
> 校对者:[@smilesboy](https://github.com/smilesboy)
包含从 Lua torch 移植的代码的包.
为了能够与现有的模型一起工作, 并简化当前 Lua torch 用户的过渡, 我们特意创建了这个包. 您可以在 `torch.legacy.nn` 中找到 `nn` 代码, 并在 `torch.legacy.optim` 中进行 `optim` 优化. 该 API 应该完适配 Lua torch.
\ No newline at end of file
# torch.utils.model_zoo
> 译者:[@之茗](https://github.com/mayuanucas)
>
> 校对者:[@aleczhang](http://community.apachecn.org/?/people/aleczhang)
```py
torch.utils.model_zoo.load_url(url, model_dir=None, map_location=None)
```
......
# torchvision.models
> 译者:[@那伊抹微笑](https://github.com/wangyangting)、@dawenzi123、[@LeeGeong](https://github.com/LeeGeong)、@liandongze
>
> 校对者:[@咸鱼](https://github.com/Watermelon233)
torchvision.models 模块的子模块中包含以下模型结构:
* [AlexNet](https://arxiv.org/abs/1404.5997)
......
# Multiprocessing package - torch.multiprocessing
> 译者:@夜神月
>
> 校对者:[@smilesboy](https://github.com/smilesboy)
torch.multiprocessing 是本地 [`multiprocessing`](https://docs.python.org/3/library/multiprocessing.html#module-multiprocessing) 多进程处理模块的一个 wrapper(包装器). 它通过注册自定义的 reducers(缩减器), 使用共享内存来提供不同进程中相同数据的共享视图. 一旦 tensor/storage(张量/存储)移动到共享内存 (请参阅 [`share_memory_()`](tensors.html#torch.Tensor.share_memory_ "torch.Tensor.share_memory_")), 就可以将其发送到其他进程而不做任何复制.
该 API 与原始模块 100% 兼容 - 只需将 `import multiprocessing` 更改为 `import torch.multiprocessing` 就 可以将所有张量通过队列发送, 或通过其它机制共享, 移动到共享内存.
......
# 用 PyTorch 做 神经转换 (Neural Transfer)
> 译者:[@Twinkle](https://github.com/kemingzeng)
**原作者**: [Alexis Jacq](https://alexis-jacq.github.io)
## 介绍
......
# torch.nn
> 译者:[@小王子](https://github.com/VPrincekin)、[@那伊抹微笑](https://github.com/wangyangting)、[@Yang Shun](https://github.com/busyboxs)、[@Zhu Yansen](https://github.com/zhuyansen)、[@woaichipinngguo](https://github.com/woaichipinngguo)、[@buldajs](https://github.com/buldajs)、[@吉思雨](https://github.com/swardsman)、[@王云峰](https://github.com/vra)、[@李雨龙](https://github.com/sawyer7246)、[@Yucong Zhu](https://github.com/Eadral)、[@林嘉应](https://github.com/garry1ng)、[@QianFanCe](https://github.com/QianFanCe)、[@dabney777](https://github.com/dabney777)、[@Alex](https://github.com/jizg)、[@SiKai Yao](https://github.com/Mabinogiysk)、[@小乔](https://github.com/QiaoXie) @laihongchang @噼里啪啦嘣 [@BarrettLi](https://github.com/BarrettLi)、[@KrokYin](https://github.com/KrokYin)、[@MUSK1881](https://github.com/JoinsenQ)
>
> 校对者:[@clown9804](http://community.apachecn.org/?/people/clown9804)、[@飞龙](https://github.com/wizardforcel)
## Parameters (参数)
```py
......
# 自动求导机制
> 译者: [@那伊抹微笑](https://github.com/wangyangting)
>
> 校对者:[@Twinkle](https://github.com/kemingzeng)
本文将介绍 autograd (自动求导) 如何工作并记录操作. 理解这一切并不是必须的, 但我们建议您熟悉它, 因为它会帮助您编写出更高效, 更简洁的程序, 并且可以帮助您进行调试.
## 反向排除 subgraphs (子图)
......
# 广播语义
> 译者:[@谢家柯](https://github.com/kelisiya)
>
> [@Twinkle](https://github.com/kemingzeng)
一些 PyTorch 的操作支持基于 [`NumPy Broadcasting Semantics`](https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html#module-numpy.doc.broadcasting "(in NumPy v1.14)").
简而言之, 如果一个 PyTorch 操作支持广播语义, 那么它的张量参数可以自动扩展为相同的大小 (不需要复制数据)
......
# CUDA 语义
> 译者:[@Chris](https://github.com/Chriskuei)
>
> 校对者:[@Twinkle](https://github.com/kemingzeng)
[`torch.cuda`](../cuda.html#module-torch.cuda "torch.cuda") 被用于设置和运行 CUDA 操作. 它会记录当前选择的 GPU, 并且分配的所有 CUDA 张量将默认在上面创建. 可以使用 [`torch.cuda.device`](../cuda.html#torch.cuda.device "torch.cuda.device") 上下文管理器更改所选设备.
但是, 一旦张量被分配, 您可以直接对其进行操作, 而不需要考虑已选择的设备, 结果将始终放在与张量相关的设备上.
......
# 扩展 PyTorch
> 译者:[@那伊抹微笑](https://github.com/wangyangting)
>
> 校对者:[@Twinkle](https://github.com/kemingzeng)
在本文中, 我们将介绍如何扩展 [`torch.nn`](../nn.html#module-torch.nn "torch.nn"), [`torch.autograd`](../autograd.html#module-torch.autograd "torch.autograd") 模块, 并且使用我们的 C 库来编写自定义的 C 扩展工具.
## 扩展 [`torch.autograd`](../autograd.html#module-torch.autograd "torch.autograd") 模块
......
# 多进程的最佳实践
> 译者:[@冯斐](https://github.com/ata123)
>
> 校对者:[@Twinkle](https://github.com/kemingzeng)
[`torch.multiprocessing`](../multiprocessing.html#module-torch.multiprocessing "torch.multiprocessing") 是 Python 中 [`multiprocessing`](https://docs.python.org/3/library/multiprocessing.html#module-multiprocessing) 模块的替代. 它支持完全相同的操作, 但进一步扩展了它的功能, 使得所有张量可以通过 [`multiprocessing.Queue`](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Queue) 传输, 将其数据移动到共享内存中, 并且只会向其他进程发送一个句柄.
注解:
......
# 序列化语义
> 译者:[@胡东瑶](https://github.com/psubnwell)
>
> 校对者:[@Twinkle](https://github.com/kemingzeng)
## 最佳实践
### 保存模型的推荐方法
......
# 使用 numpy 和 scipy 创建扩展
> 译者:[@飞龙](https://github.com/wizardforcel)
**作者**: [Adam Paszke](https://github.com/apaszke)
这个教程中, 我们将完成以下两个任务:
......
# torch.onnx
> 译者:[@Haofan Wang](https://github.com/haofanwang)
>
> 校对者:[@aleczhang](http://community.apachecn.org/?/people/aleczhang)
torch.onnx 模块可以将模型导出成 ONNX IR 形式.被导出的模型可以通过 ONNX 库被重新导入, 然后转化为可以在其它的深度学习框架上运行的模型.
## 示例:从Pytorch到Caffe2的端对端AlexNet模型
......
# torch.optim
> 译者:[@于增源](https://github.com/ZengyuanYu)
>
> 校对者:[@青梅往事](https://github.com/2556120684)
`torch.optim` is a package implementing various optimization algorithms. Most commonly used methods are already supported, and the interface is general enough, so that more sophisticated ones can be also easily integrated in the future.
## 如何使用 optimizer (优化器)
......
# 跟着例子学习 PyTorch
> 译者:[@yongjay13](https://github.com/yongjay13)、[@speedmancs](https://github.com/speedmancs)
>
> 校对者:[@bringtree](https://github.com/bringtree)
**Author**: [Justin Johnson](https://github.com/jcjohnson/pytorch-examples)
这个教程通过一些单独的示例介绍了 [PyTorch](https://github.com/pytorch/pytorch) 的基本概念.
......
# PyTorch: 动态控制流程 + 权重共享
> 译者:[@yongjay13](https://github.com/yongjay13)、[@speedmancs](https://github.com/speedmancs)
>
> 校对者:[@bringtree](https://github.com/bringtree)
为了展示PyTorch的动态图的强大, 我们实现了一个非常奇异的模型: 一个全连接的ReLU激活的神经网络, 每次前向计算时都随机选一个1到4之间的数字n, 然后接下来就有n层隐藏层, 每个隐藏层的连接权重共享.
```py
......
# PyTorch: 定制化nn模块
> 译者:[@yongjay13](https://github.com/yongjay13)、[@speedmancs](https://github.com/speedmancs)
>
> 校对者:[@bringtree](https://github.com/bringtree)
本例中的全连接神经网络有一个隐藏层, 后接ReLU激活层, 并且不带偏置参数. 训练时通过最小化欧式距离的平方, 来学习从x到y的映射.
在实现中我们将定义一个定制化的模块子类. 如果已有模块串起来不能满足你的复杂需求, 那么你就能以这种方式来定义自己的模块。
......
# PyTorch: 定义新的autograd函数
> 译者:[@yongjay13](https://github.com/yongjay13)、[@speedmancs](https://github.com/speedmancs)
>
> 校对者:[@bringtree](https://github.com/bringtree)
本例中的全连接神经网络有一个隐藏层, 后接ReLU激活层, 并且不带偏置参数. 训练时通过最小化欧式距离的平方, 来学习从x到y的映射.
在此实现中, 我们使用PyTorch变量上的函数来进行前向计算, 然后用PyTorch的autograd计算梯度
......
# PyTorch: nn包
> 译者:[@yongjay13](https://github.com/yongjay13)、[@speedmancs](https://github.com/speedmancs)
>
> 校对者:[@bringtree](https://github.com/bringtree)
本例中的全连接神经网络有一个隐藏层, 后接ReLU激活层, 并且不带偏置参数. 训练时通过最小化欧式距离的平方, 来学习从x到y的映射.
实现中用PyTorch的nn包来搭建神经网络. 如果使用PyTorch的autograd包, 定义计算图和梯度计算将变得非常容易. 但是对于一些复杂的神经网络来说, 只用autograd还是有点底层了. 这正是nn包的用武之地. nn包定义了很多模块, 你可以把它们当作一个个的神经网络层. 每个模块都有输入输出, 并可能有一些可训练权重.
......
# PyTorch: optim包
> 译者:[@yongjay13](https://github.com/yongjay13)、[@speedmancs](https://github.com/speedmancs)
>
> 校对者:[@bringtree](https://github.com/bringtree)
本例中的全连接神经网络有一个隐藏层, 后接ReLU激活层, 并且不带偏置参数. 训练时通过最小化欧式距离的平方, 来学习从x到y的映射
在此实现中, 我们将弃用之前手工更新权值的做法, 转而用PyTorch的nn包来搭建神经网络. optim包则用来定义更新权值的优化器. optim包有众多深度学习常用的优化算法, 包括SGD+momentum, RMSProp, Adam等.
......
# PyTorch: Tensors
> 译者:[@yongjay13](https://github.com/yongjay13)、[@speedmancs](https://github.com/speedmancs)
>
> 校对者:[@bringtree](https://github.com/bringtree)
本例中的全连接神经网络有一个隐藏层, 后接ReLU激活层, 并且不带偏置参数. 训练时使用欧式距离平方来学习从x到y的映射.
实现中我们使用了PyTorch的张量来进行前向计算, 误差计算和后向传播.
......
# PyTorch: 变量和autograd
> 译者:[@yongjay13](https://github.com/yongjay13)、[@speedmancs](https://github.com/speedmancs)
>
> 校对者:[@bringtree](https://github.com/bringtree)
本例中的全连接神经网络有一个隐藏层, 后接ReLU激活层, 并且不带偏置参数. 训练时通过最小化欧式距离的平方, 来学习从x到y的映射.
在实现中, 我们将使用PyTorch变量的函数来进行前向计算, 并用PyTorch的autograd计算梯度
......
# TensorFlow: 静态图
> 译者:[@yongjay13](https://github.com/yongjay13)、[@speedmancs](https://github.com/speedmancs)
>
> 校对者:[@bringtree](https://github.com/bringtree)
本例中的全连接神经网络有一个隐藏层, 后接ReLU激活层, 并且不带偏置参数. 训练时通过最小化欧式距离的平方, 来学习从x到y的映射.
在实现中, 我们会用基本的TensorFlow操作来建立一个计算图, 随后多次执行这个图来训练网络.
......
# Warm-up: numpy
> 译者:[@yongjay13](https://github.com/yongjay13)、[@speedmancs](https://github.com/speedmancs)
>
> 校对者:[@bringtree](https://github.com/bringtree)
本例中的神经网络有一个隐藏层, 后接ReLU激活层, 并且不带偏置参数. 训练时使用欧几里得误差来学习从x到y的映射.
我们只用到了numpy, 完全手写实现神经网络, 包括前向计算, 误差计算和后向传播.
......
# 强化学习(DQN)教程
> 译者:[@Lisanaaa](https://github.com/Lisanaaa)
**作者**: [Adam Paszke](https://github.com/apaszke)
本教程演示如何使用 PyTorch 对任务 CartPole-v0 训练 Deep Q Learning(DQN)代理(即一个算法黑箱), 该任务来自于 [OpenAI Gym](https://gym.openai.com/).
......
# 用基于注意力机制的seq2seq神经网络进行翻译
> 译者:[@EWilsen](http://community.apachecn.org/?/people/EWilsen)
**作者**: [Sean Robertson](https://github.com/spro/practical-pytorch)
这个教程主要讲解用一个神经网络将法语翻译成英语.
......
# torch.sparse
> 译者:[@王帅](https://github.com/sirwangshuai)
>
> 校对者:[@Timor](https://github.com/timors)
Warning
此 API 目前是实验性的 , 可能会在不久的将来发生变化 .
......
# 空间转换网络 (Spatial Transformer Networks) 教程
> 译者:[@Twinkle](https://github.com/kemingzeng)
**原作者**: [Ghassen HAMROUNI](https://github.com/GHamrouni)
![http://pytorch.apachecn.org/cn/tutorials/_images/FSeq.png](img/01cb117c4c0d3fcaa29ac2f3c359529a.jpg)
......
# torch.Storage
> 译者:@FanXing
>
> 校对者:[@Timor](https://github.com/timors)
一个 `torch.Storage` 是一个单一数据类型的连续一维数组 .
每个 [`torch.Tensor`](tensors.html#torch.Tensor "torch.Tensor") 都有一个对应的相同数据类型的存储 .
......
# 使用 ONNX 将模型从 PyTorch 迁移到 Caffe2 和 Mobile
> 译者:[@片刻](https://github.com/jiangzhonglian)
在本教程中, 我们将介绍如何使用 ONNX 将 PyTorch 中定义的模型转换为 ONNX 格式, 然后将其加载到 Caffe2 中. 一旦进入 Caffe2 , 我们可以运行该模型以仔细检查它是否正确导出, 然后演示如何使用 Caffe2 功能(例如移动导出器)在移动设备上执行模型.
在本教程中, 您需要安装 [onnx](https://github.com/onnx/onnx), [onnx-caffe2](https://github.com/onnx/onnx-caffe2)[Caffe2](https://caffe2.ai/). 你可以通过 `conda install -c ezyang onnx onnx-caffe2` 用 onnx 和 onnx-caffe2 获得二进制版本.
......
# torch.Tensor
> 译者:[[@Sylvester](https://github.com/coboe)、[@那伊抹微笑](https://github.com/wangyangting)
>
> 校对者:[@Sariel](https://github.com/Cyril-CC)
> `torch.Tensor` 是一种包含单一数据类型元素的多维矩阵.
Torch 定义了七种 CPU tensor 类型和八种 GPU tensor 类型:
......
# torch
> 译者:[@那伊抹微笑](https://github.com/wangyangting)、@yudong、[@小瑶](https://github.com/chenyyx)、[@片刻](https://github.com/jiangzhonglian)、[@李雨龙](https://github.com/sawyer7246)、[@K](https://github.com/YaoSam) [@devin](https://github.com/EVYang1992)、[@张假飞](https://github.com/nothingcouldbebetter)、[@rickllyxu](https://github.com/rickllyxu)
>
> 校对者:[@张假飞](https://github.com/nothingcouldbebetter)、[@飞龙](https://github.com/wizardforcel)
torch package 包含了多维张量的数据结构, 以及基于其上的多种数学操作. 此外, 它还提供了许多用于高效序列化 Tensor 和任意类型的实用工具包, 以及一起其它有用的实用工具包.
它有一个 CUDA 的对应实现, 它使您能够在计算能力 >=0.3 的 NVIDIA GPU 上进行张量运算.
......
# torchvision
> 译者:[@那伊抹微笑](https://github.com/wangyangting)、@dawenzi123、[@LeeGeong](https://github.com/LeeGeong)、@liandongze
>
> 校对者:[@咸鱼](https://github.com/Watermelon233)
模块 `torchvision` 库包含了计算机视觉中一些常用的数据集, 模型架构以及图像变换方法.
Package Reference
......
# 迁移学习教程
> 译者:[@Sylvester](https://github.com/coboe)
>
> 校对者:[@Archie Yu](https://github.com/archie-yu)
**作者**: [Sasank Chilamkurthy](https://chsasank.github.io)
这个教程将教你如何使用迁移学习训练你的网络. 你可以在 [cs231n 笔记](http://cs231n.github.io/transfer-learning/) 中 阅读更多有关迁移学习的信息.
......
# torchvision.transforms
> 译者:[@那伊抹微笑](https://github.com/wangyangting)、@dawenzi123、[@LeeGeong](https://github.com/LeeGeong)、@liandongze
>
> 校对者:[@咸鱼](https://github.com/Watermelon233)
Transforms (变换) 是常见的 image transforms (图像变换) .他们可以使用 `Compose` 类以链在一起来进行操作.
```py
......
# torchvision.utils
> 译者:[@那伊抹微笑](https://github.com/wangyangting)、@dawenzi123、[@LeeGeong](https://github.com/LeeGeong)、@liandongze
>
> 校对者:[@咸鱼](https://github.com/Watermelon233)
```py
torchvision.utils.make_grid(tensor, nrow=8, padding=2, normalize=False, range=None, scale_each=False, pad_value=0)
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册