提交 60061cc6 编写于 作者: W wizardforcel

2021-01-13 15:32:44

上级 46fbf5a9
# 使用 PyTorch 进行深度学习:60 分钟的闪电战¶ # 使用 PyTorch 进行深度学习:60 分钟的闪电战¶
> 原文: [https://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html](https://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html) > 原文:<https://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html>
**作者**[Soumith Chintala](http://soumith.ch) **作者**[Soumith Chintala](http://soumith.ch)
......
# Tensors¶ # Tensors¶
> 原文: [https://pytorch.org/tutorials/beginner/blitz/tensor_tutorial.html#sphx-glr-beginner-blitz-tensor-tutorial-py](https://pytorch.org/tutorials/beginner/blitz/tensor_tutorial.html#sphx-glr-beginner-blitz-tensor-tutorial-py) > 原文:<https://pytorch.org/tutorials/beginner/blitz/tensor_tutorial.html#sphx-glr-beginner-blitz-tensor-tutorial-py>
张量是一种特殊的数据结构,与数组和矩阵非常相似。 在 PyTorch 中,我们使用张量对模型的输入和输出以及模型的参数进行编码。 张量是一种特殊的数据结构,与数组和矩阵非常相似。 在 PyTorch 中,我们使用张量对模型的输入和输出以及模型的参数进行编码。
......
# Torch.autograd 的简要介绍¶ # Torch.autograd 的简要介绍¶
> 原文: [https://pytorch.org/tutorials/beginner/blitz/autograd_tutorial.html#sphx-glr-beginner-blitz-autograd-tutorial-py](https://pytorch.org/tutorials/beginner/blitz/autograd_tutorial.html#sphx-glr-beginner-blitz-autograd-tutorial-py) > 原文:<https://pytorch.org/tutorials/beginner/blitz/autograd_tutorial.html#sphx-glr-beginner-blitz-autograd-tutorial-py>
`torch.autograd`是 PyTorch 的自动差分引擎,可为神经网络训练提供支持。 在本节中,您将获得有关 autograd 如何帮助神经网络训练的概念性理解。 `torch.autograd`是 PyTorch 的自动差分引擎,可为神经网络训练提供支持。 在本节中,您将获得有关 autograd 如何帮助神经网络训练的概念性理解。
......
# 神经网络¶ # 神经网络¶
> 原文: [https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html#sphx-glr-beginner-blitz-neural-networks-tutorial-py](https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html#sphx-glr-beginner-blitz-neural-networks-tutorial-py) > 原文:<https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html#sphx-glr-beginner-blitz-neural-networks-tutorial-py>
可以使用`torch.nn`包构建神经网络。 可以使用`torch.nn`包构建神经网络。
......
# 训练分类器 # 训练分类器
> 原文: [https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-py](https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-py) > 原文:<https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-py>
就是这个。 您已经了解了如何定义神经网络,计算损耗并更新网络的权重。 就是这个。 您已经了解了如何定义神经网络,计算损耗并更新网络的权重。
......
# 通过示例学习 PyTorch¶ # 通过示例学习 PyTorch¶
> 原文: [https://pytorch.org/tutorials/beginner/pytorch_with_examples.html](https://pytorch.org/tutorials/beginner/pytorch_with_examples.html) > 原文:<https://pytorch.org/tutorials/beginner/pytorch_with_examples.html>
**作者**[贾斯汀·约翰逊](https://github.com/jcjohnson/pytorch-examples) **作者**[贾斯汀·约翰逊](https://github.com/jcjohnson/pytorch-examples)
......
# 热身:numpy¶ # 热身:numpy¶
> 原文: [https://pytorch.org/tutorials/beginner/examples_tensor/polynomial_numpy.html#sphx-glr-beginner-examples-tensor-polynomial-numpy-py](https://pytorch.org/tutorials/beginner/examples_tensor/polynomial_numpy.html#sphx-glr-beginner-examples-tensor-polynomial-numpy-py) > 原文:<https://pytorch.org/tutorials/beginner/examples_tensor/polynomial_numpy.html#sphx-glr-beginner-examples-tensor-polynomial-numpy-py>
经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \) 经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \)
......
# PyTorch:张量¶ # PyTorch:张量¶
> 原文: [https://pytorch.org/tutorials/beginner/examples_tensor/polynomial_tensor.html#sphx-glr-beginner-examples-tensor-polynomial-tensor-py](https://pytorch.org/tutorials/beginner/examples_tensor/polynomial_tensor.html#sphx-glr-beginner-examples-tensor-polynomial-tensor-py) > 原文:<https://pytorch.org/tutorials/beginner/examples_tensor/polynomial_tensor.html#sphx-glr-beginner-examples-tensor-polynomial-tensor-py>
经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \) 经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \)
......
# PyTorch:张量和 autograd¶ # PyTorch:张量和 autograd¶
> 原文: [https://pytorch.org/tutorials/beginner/examples_autograd/polynomial_autograd.html#sphx-glr-beginner-examples-autograd-polynomial-autograd-py](https://pytorch.org/tutorials/beginner/examples_autograd/polynomial_autograd.html#sphx-glr-beginner-examples-autograd-polynomial-autograd-py) > 原文:<https://pytorch.org/tutorials/beginner/examples_autograd/polynomial_autograd.html#sphx-glr-beginner-examples-autograd-polynomial-autograd-py>
经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \) 经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \)
......
# PyTorch:定义新的 autograd 函数¶ # PyTorch:定义新的 autograd 函数¶
> 原文: [https://pytorch.org/tutorials/beginner/examples_autograd/polynomial_custom_function.html#sphx-glr-beginner-examples-autograd-polynomial-custom-function-py](https://pytorch.org/tutorials/beginner/examples_autograd/polynomial_custom_function.html#sphx-glr-beginner-examples-autograd-polynomial-custom-function-py) > 原文:<https://pytorch.org/tutorials/beginner/examples_autograd/polynomial_custom_function.html#sphx-glr-beginner-examples-autograd-polynomial-custom-function-py>
经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \)。 而不是将多项式写为\(y = a + bx + cx ^ 2 + dx ^ 3 \),我们将多项式写为\(y = a + b P_3(c + dx)\)其中\(P_3(x )= rac {1} {2} \ left(5x ^ 3-3x ight)\)是三次的[勒让德多项式](https://en.wikipedia.org/wiki/Legendre_polynomials) 经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \)。 而不是将多项式写为\(y = a + bx + cx ^ 2 + dx ^ 3 \),我们将多项式写为\(y = a + b P_3(c + dx)\)其中\(P_3(x )= rac {1} {2} \ left(5x ^ 3-3x ight)\)是三次的[勒让德多项式](https://en.wikipedia.org/wiki/Legendre_polynomials)
......
# PyTorch:nn¶ # PyTorch:nn¶
> 原文: [https://pytorch.org/tutorials/beginner/examples_nn/polynomial_nn.html#sphx-glr-beginner-examples-nn-polynomial-nn-py](https://pytorch.org/tutorials/beginner/examples_nn/polynomial_nn.html#sphx-glr-beginner-examples-nn-polynomial-nn-py) > 原文:<https://pytorch.org/tutorials/beginner/examples_nn/polynomial_nn.html#sphx-glr-beginner-examples-nn-polynomial-nn-py>
经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \) 经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \)
......
# PyTorch:优化¶ # PyTorch:优化¶
> 原文: [https://pytorch.org/tutorials/beginner/examples_nn/polynomial_optim.html#sphx-glr-beginner-examples-nn-polynomial-optim-py](https://pytorch.org/tutorials/beginner/examples_nn/polynomial_optim.html#sphx-glr-beginner-examples-nn-polynomial-optim-py) > 原文:<https://pytorch.org/tutorials/beginner/examples_nn/polynomial_optim.html#sphx-glr-beginner-examples-nn-polynomial-optim-py>
经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \) 经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \)
......
# PyTorch:自定义 nn 模块¶ # PyTorch:自定义 nn 模块¶
> 原文: [https://pytorch.org/tutorials/beginner/examples_nn/polynomial_module.html#sphx-glr-beginner-examples-nn-polynomial-module-py](https://pytorch.org/tutorials/beginner/examples_nn/polynomial_module.html#sphx-glr-beginner-examples-nn-polynomial-module-py) > 原文:<https://pytorch.org/tutorials/beginner/examples_nn/polynomial_module.html#sphx-glr-beginner-examples-nn-polynomial-module-py>
经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \) 经过训练的三阶多项式,可以通过最小化平方的欧几里得距离来预测\(y = \ sin(x)\)\(-pi \)\(pi \)
......
# PyTorch:控制流+权重共享¶ # PyTorch:控制流+权重共享¶
> 原文: [https://pytorch.org/tutorials/beginner/examples_nn/dynamic_net.html#sphx-glr-beginner-examples-nn-dynamic-net-py](https://pytorch.org/tutorials/beginner/examples_nn/dynamic_net.html#sphx-glr-beginner-examples-nn-dynamic-net-py) > 原文:<https://pytorch.org/tutorials/beginner/examples_nn/dynamic_net.html#sphx-glr-beginner-examples-nn-dynamic-net-py>
为了展示 PyTorch 动态图的强大功能,我们将实现一个非常奇怪的模型:一个三阶多项式,在每个前向传递中选择 3 到 5 之间的一个随机数,并使用该数量的阶次,多次重复使用相同的权重进行计算 第四和第五阶。 为了展示 PyTorch 动态图的强大功能,我们将实现一个非常奇怪的模型:一个三阶多项式,在每个前向传递中选择 3 到 5 之间的一个随机数,并使用该数量的阶次,多次重复使用相同的权重进行计算 第四和第五阶。
......
# torch.nn 到底是什么?¶ # torch.nn 到底是什么?¶
> 原文: [https://pytorch.org/tutorials/beginner/nn_tutorial.html](https://pytorch.org/tutorials/beginner/nn_tutorial.html) > 原文:<https://pytorch.org/tutorials/beginner/nn_tutorial.html>
作者:杰里米·霍华德(Jeremy Howard), [fast.ai](https://www.fast.ai) 。 感谢 Rachel Thomas 和 Francisco Ingham。 作者:杰里米·霍华德(Jeremy Howard), [fast.ai](https://www.fast.ai) 。 感谢 Rachel Thomas 和 Francisco Ingham。
......
# 使用 TensorBoard 可视化模型,数据和培训 # 使用 TensorBoard 可视化模型,数据和培训
> 原文: [https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html](https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html>
[60 分钟闪电战](https://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html)中,我们向您展示了如何加载数据,如何通过定义为`nn.Module`子类的模型提供数据,如何在训练数据上训练该模型以及在测试数据上对其进行测试。 为了了解发生的情况,我们在模型训练期间打印一些统计数据,以了解训练是否在进行中。 但是,我们可以做得更好:PyTorch 与 TensorBoard 集成在一起,TensorBoard 是一种工具,用于可视化神经网络训练运行的结果。 本教程使用 [Fashion-MNIST 数据集](https://github.com/zalandoresearch/fashion-mnist)说明了其某些功能,可以使用 <cite>torchvision.datasets</cite> 将其读入 PyTorch。 [60 分钟闪电战](https://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html)中,我们向您展示了如何加载数据,如何通过定义为`nn.Module`子类的模型提供数据,如何在训练数据上训练该模型以及在测试数据上对其进行测试。 为了了解发生的情况,我们在模型训练期间打印一些统计数据,以了解训练是否在进行中。 但是,我们可以做得更好:PyTorch 与 TensorBoard 集成在一起,TensorBoard 是一种工具,用于可视化神经网络训练运行的结果。 本教程使用 [Fashion-MNIST 数据集](https://github.com/zalandoresearch/fashion-mnist)说明了其某些功能,可以使用 <cite>torchvision.datasets</cite> 将其读入 PyTorch。
......
# TorchVision 对象检测微调教程¶ # TorchVision 对象检测微调教程¶
> 原文: [https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html](https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html>
小费 小费
......
# 计算机视觉教程的转移学习 # 计算机视觉教程的转移学习
> 原文: [https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html](https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html) > 原文:<https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html>
**作者**[Sasank Chilamkurthy](https://chsasank.github.io) **作者**[Sasank Chilamkurthy](https://chsasank.github.io)
......
# 对抗示例生成 # 对抗示例生成
> 原文: [https://pytorch.org/tutorials/beginner/fgsm_tutorial.html](https://pytorch.org/tutorials/beginner/fgsm_tutorial.html) > 原文:<https://pytorch.org/tutorials/beginner/fgsm_tutorial.html>
**作者:** [Nathan Inkawhich](https://github.com/inkawhich) **作者:** [Nathan Inkawhich](https://github.com/inkawhich)
......
# DCGAN 教程¶ # DCGAN 教程¶
> 原文: [https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html](https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html) > 原文:<https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html>
**作者**[Nathan Inkawhich](https://github.com/inkawhich) **作者**[Nathan Inkawhich](https://github.com/inkawhich)
......
# 音频 I / O 和 torchaudio 的预处理¶ # 音频 I / O 和 torchaudio 的预处理¶
> 原文: [https://pytorch.org/tutorials/beginner/audio_preprocessing_tutorial.html](https://pytorch.org/tutorials/beginner/audio_preprocessing_tutorial.html) > 原文:<https://pytorch.org/tutorials/beginner/audio_preprocessing_tutorial.html>
PyTorch 是一个开源深度学习平台,提供了从研究原型到具有 GPU 支持的生产部署的无缝路径。 PyTorch 是一个开源深度学习平台,提供了从研究原型到具有 GPU 支持的生产部署的无缝路径。
......
# 使用 torchaudio 的语音命令识别 # 使用 torchaudio 的语音命令识别
> 原文: [https://pytorch.org/tutorials/intermediate/speech_command_recognition_with_torchaudio.html](https://pytorch.org/tutorials/intermediate/speech_command_recognition_with_torchaudio.html) > 原文:<https://pytorch.org/tutorials/intermediate/speech_command_recognition_with_torchaudio.html>
本教程将向您展示如何正确设置音频数据集的格式,然后在数据集上训练/测试音频分类器网络。 本教程将向您展示如何正确设置音频数据集的格式,然后在数据集上训练/测试音频分类器网络。
......
# 使用 nn.Transformer 和 TorchText 进行序列到序列建模 # 使用 nn.Transformer 和 TorchText 进行序列到序列建模
> 原文: [https://pytorch.org/tutorials/beginner/transformer_tutorial.html](https://pytorch.org/tutorials/beginner/transformer_tutorial.html) > 原文:<https://pytorch.org/tutorials/beginner/transformer_tutorial.html>
这是一个有关如何训练使用 [nn.Transformer](https://pytorch.org/docs/master/nn.html?highlight=nn%20transformer#torch.nn.Transformer) 模块的序列到序列模型的教程。 这是一个有关如何训练使用 [nn.Transformer](https://pytorch.org/docs/master/nn.html?highlight=nn%20transformer#torch.nn.Transformer) 模块的序列到序列模型的教程。
......
# 从零开始的 NLP:使用字符级 RNN 对名称进行分类¶ # 从零开始的 NLP:使用字符级 RNN 对名称进行分类¶
> 原文: [https://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html](https://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html>
**作者**[Sean Robertson](https://github.com/spro/practical-pytorch) **作者**[Sean Robertson](https://github.com/spro/practical-pytorch)
......
# 从零开始的 NLP:使用字符级 RNN 生成名称 # 从零开始的 NLP:使用字符级 RNN 生成名称
> 原文: [https://pytorch.org/tutorials/intermediate/char_rnn_generation_tutorial.html](https://pytorch.org/tutorials/intermediate/char_rnn_generation_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/char_rnn_generation_tutorial.html>
**作者**[Sean Robertson](https://github.com/spro/practical-pytorch) **作者**[Sean Robertson](https://github.com/spro/practical-pytorch)
......
# 从零开始的 NLP:从序列到序列网络的翻译和注意¶ # 从零开始的 NLP:从序列到序列网络的翻译和注意¶
> 原文: [https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html](https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html>
**作者**[Sean Robertson](https://github.com/spro/practical-pytorch) **作者**[Sean Robertson](https://github.com/spro/practical-pytorch)
......
# 使用 TorchText 进行文本分类 # 使用 TorchText 进行文本分类
> 原文: [https://pytorch.org/tutorials/beginner/text_sentiment_ngrams_tutorial.html](https://pytorch.org/tutorials/beginner/text_sentiment_ngrams_tutorial.html) > 原文:<https://pytorch.org/tutorials/beginner/text_sentiment_ngrams_tutorial.html>
本教程说明如何使用`torchtext`中的文本分类数据集,包括 本教程说明如何使用`torchtext`中的文本分类数据集,包括
......
# TorchText 语言翻译¶ # TorchText 语言翻译¶
> 原文: [https://pytorch.org/tutorials/beginner/torchtext_translation_tutorial.html](https://pytorch.org/tutorials/beginner/torchtext_translation_tutorial.html) > 原文:<https://pytorch.org/tutorials/beginner/torchtext_translation_tutorial.html>
本教程介绍了如何使用`torchtext`预处理包含英语和德语句子的著名数据集的数据,并使用它来训练序列到序列模型,并能将德语句子翻译成英语。 本教程介绍了如何使用`torchtext`预处理包含英语和德语句子的著名数据集的数据,并使用它来训练序列到序列模型,并能将德语句子翻译成英语。
......
# 强化学习(DQN)教程¶ # 强化学习(DQN)教程¶
> 原文: [https://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html](https://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html) > 原文:<https://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html>
**作者**[Adam Paszke](https://github.com/apaszke) **作者**[Adam Paszke](https://github.com/apaszke)
......
# 训练 Mario 播放 RL 代理¶ # 训练 Mario 播放 RL 代理¶
> 原文: [https://pytorch.org/tutorials/intermediate/mario_rl_tutorial.html](https://pytorch.org/tutorials/intermediate/mario_rl_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/mario_rl_tutorial.html>
Authors: [Yuansong Feng](https://github.com/YuansongFeng) , [Suraj Subramanian](https://github.com/suraj813) , [Howard Wang](https://github.com/hw26) , [Steven Guo](https://github.com/GuoYuzhang) . Authors: [Yuansong Feng](https://github.com/YuansongFeng) , [Suraj Subramanian](https://github.com/suraj813) , [Howard Wang](https://github.com/hw26) , [Steven Guo](https://github.com/GuoYuzhang) .
......
# 通过带有 Flask 的 REST API 在 Python 中部署 PyTorch¶ # 通过带有 Flask 的 REST API 在 Python 中部署 PyTorch¶
> 原文: [https://pytorch.org/tutorials/intermediate/flask_rest_api_tutorial.html](https://pytorch.org/tutorials/intermediate/flask_rest_api_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/flask_rest_api_tutorial.html>
**作者**[Avinash Sajjanshetty](https://avi.im) **作者**[Avinash Sajjanshetty](https://avi.im)
......
# TorchScript 简介¶ # TorchScript 简介¶
> 原文: [https://pytorch.org/tutorials/beginner/Intro_to_TorchScript_tutorial.html](https://pytorch.org/tutorials/beginner/Intro_to_TorchScript_tutorial.html) > 原文:<https://pytorch.org/tutorials/beginner/Intro_to_TorchScript_tutorial.html>
*James Reed (jamesreed@fb.com), Michael Suo (suo@fb.com)* , rev2 *James Reed (jamesreed@fb.com), Michael Suo (suo@fb.com)* , rev2
......
# 在 C ++中加载 TorchScript 模型 # 在 C ++中加载 TorchScript 模型
> 原文: [https://pytorch.org/tutorials/advanced/cpp_export.html](https://pytorch.org/tutorials/advanced/cpp_export.html) > 原文:<https://pytorch.org/tutorials/advanced/cpp_export.html>
顾名思义,PyTorch 的主要接口是 Python 编程语言。 尽管 Python 是许多需要动态性和易于迭代的场景的合适且首选的语言,但是在同样许多情况下,Python 的这些属性恰恰是不利的。 后者经常应用的一种环境是*生产* –低延迟和严格部署要求的土地。 对于生产场景,即使仅将 C ++绑定到 Java,Rust 或 Go 之类的另一种语言中,它也是经常选择的语言。 以下各段将概述 PyTorch 提供的从现有 Python 模型到序列化表示形式的路径,该序列化表示形式可以*加载**完全由 C ++执行,*不依赖于 Python。 顾名思义,PyTorch 的主要接口是 Python 编程语言。 尽管 Python 是许多需要动态性和易于迭代的场景的合适且首选的语言,但是在同样许多情况下,Python 的这些属性恰恰是不利的。 后者经常应用的一种环境是*生产* –低延迟和严格部署要求的土地。 对于生产场景,即使仅将 C ++绑定到 Java,Rust 或 Go 之类的另一种语言中,它也是经常选择的语言。 以下各段将概述 PyTorch 提供的从现有 Python 模型到序列化表示形式的路径,该序列化表示形式可以*加载**完全由 C ++执行,*不依赖于 Python。
......
# (可选)将模型从 PyTorch 导出到 ONNX 并使用 ONNX Runtime 运行它 # (可选)将模型从 PyTorch 导出到 ONNX 并使用 ONNX Runtime 运行它
> 原文: [https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html](https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html) > 原文:<https://pytorch.org/tutorials/advanced/super_resolution_with_onnxruntime.html>
在本教程中,我们描述了如何将 PyTorch 中定义的模型转换为 ONNX 格式,然后在 ONNX Runtime 中运行它。 在本教程中,我们描述了如何将 PyTorch 中定义的模型转换为 ONNX 格式,然后在 ONNX Runtime 中运行它。
......
# (原型)PyTorch 中的命名张量简介¶ # (原型)PyTorch 中的命名张量简介¶
> 原文: [https://pytorch.org/tutorials/intermediate/named_tensor_tutorial.html](https://pytorch.org/tutorials/intermediate/named_tensor_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/named_tensor_tutorial.html>
**作者**[Richard Zou](https://github.com/zou3519) **作者**[Richard Zou](https://github.com/zou3519)
......
# (beta)在 PyTorch 中引导最后的内存格式¶ # (beta)在 PyTorch 中引导最后的内存格式¶
> 原文: [https://pytorch.org/tutorials/intermediate/memory_format_tutorial.html](https://pytorch.org/tutorials/intermediate/memory_format_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/memory_format_tutorial.html>
**作者**[Vitaly Fedyunin](https://github.com/VitalyFedyunin) **作者**[Vitaly Fedyunin](https://github.com/VitalyFedyunin)
......
# 使用 PyTorch C ++前端¶ # 使用 PyTorch C ++前端¶
> 原文: [https://pytorch.org/tutorials/advanced/cpp_frontend.html](https://pytorch.org/tutorials/advanced/cpp_frontend.html) > 原文:<https://pytorch.org/tutorials/advanced/cpp_frontend.html>
PyTorch C ++前端是 PyTorch 机器学习框架的纯 C ++接口。 虽然 PyTorch 的主要接口自然是 Python,但此 Python API 位于强大的 C ++代码库之上,提供基本的数据结构和功能,例如张量和自动微分。 C ++前端公开了纯 C ++ 11 API,该 API 使用机器学习培训和推理所需的工具扩展了此基础 C ++代码库。 这包括用于神经网络建模的通用组件的内置集合; 使用自定义模块扩展此集合的 API; 一个流行的优化算法库,例如随机梯度下降; 具有 API 的并行数据加载器,用于定义和加载数据集; 序列化例程等。 PyTorch C ++前端是 PyTorch 机器学习框架的纯 C ++接口。 虽然 PyTorch 的主要接口自然是 Python,但此 Python API 位于强大的 C ++代码库之上,提供基本的数据结构和功能,例如张量和自动微分。 C ++前端公开了纯 C ++ 11 API,该 API 使用机器学习培训和推理所需的工具扩展了此基础 C ++代码库。 这包括用于神经网络建模的通用组件的内置集合; 使用自定义模块扩展此集合的 API; 一个流行的优化算法库,例如随机梯度下降; 具有 API 的并行数据加载器,用于定义和加载数据集; 序列化例程等。
......
# 自定义 C ++和 CUDA 扩展¶ # 自定义 C ++和 CUDA 扩展¶
> 原文: [https://pytorch.org/tutorials/advanced/cpp_extension.html](https://pytorch.org/tutorials/advanced/cpp_extension.html) > 原文:<https://pytorch.org/tutorials/advanced/cpp_extension.html>
**作者**[Peter Goldsborough](https://www.goldsborough.me/) **作者**[Peter Goldsborough](https://www.goldsborough.me/)
......
# 使用自定义 C ++运算符扩展 TorchScript¶ # 使用自定义 C ++运算符扩展 TorchScript¶
> 原文: [https://pytorch.org/tutorials/advanced/torch_script_custom_ops.html](https://pytorch.org/tutorials/advanced/torch_script_custom_ops.html) > 原文:<https://pytorch.org/tutorials/advanced/torch_script_custom_ops.html>
PyTorch 1.0 版本向 PyTorch 引入了一种新的编程模型,称为 [TorchScript](https://pytorch.org/docs/master/jit.html) 。 TorchScript 是 Python 编程语言的子集,可以通过 TorchScript 编译器进行解析,编译和优化。 此外,已编译的 TorchScript 模型可以选择序列化为磁盘文件格式,然后可以从纯 C ++(以及 Python)加载并运行该文件格式以进行推理。 PyTorch 1.0 版本向 PyTorch 引入了一种新的编程模型,称为 [TorchScript](https://pytorch.org/docs/master/jit.html) 。 TorchScript 是 Python 编程语言的子集,可以通过 TorchScript 编译器进行解析,编译和优化。 此外,已编译的 TorchScript 模型可以选择序列化为磁盘文件格式,然后可以从纯 C ++(以及 Python)加载并运行该文件格式以进行推理。
......
# 使用自定义 C ++类扩展 TorchScript¶ # 使用自定义 C ++类扩展 TorchScript¶
> 原文: [https://pytorch.org/tutorials/advanced/torch_script_custom_classes.html](https://pytorch.org/tutorials/advanced/torch_script_custom_classes.html) > 原文:<https://pytorch.org/tutorials/advanced/torch_script_custom_classes.html>
本教程是[自定义运算符](torch_script_custom_ops.html)教程的后续教程,并介绍了我们为将 C ++类同时绑定到 TorchScript 和 Python 而构建的 API。 该 API 与 [pybind11](https://github.com/pybind/pybind11) 非常相似,如果您熟悉该系统,则大多数概念都将转移过来。 本教程是[自定义运算符](torch_script_custom_ops.html)教程的后续教程,并介绍了我们为将 C ++类同时绑定到 TorchScript 和 Python 而构建的 API。 该 API 与 [pybind11](https://github.com/pybind/pybind11) 非常相似,如果您熟悉该系统,则大多数概念都将转移过来。
......
# TorchScript 中的动态并行性¶ # TorchScript 中的动态并行性¶
> 原文: [https://pytorch.org/tutorials/advanced/torch-script-parallelism.html](https://pytorch.org/tutorials/advanced/torch-script-parallelism.html) > 原文:<https://pytorch.org/tutorials/advanced/torch-script-parallelism.html>
在本教程中,我们介绍在 TorchScript 中执行*动态互操作并行化*的语法。 此并行性具有以下属性: 在本教程中,我们介绍在 TorchScript 中执行*动态互操作并行化*的语法。 此并行性具有以下属性:
......
# C ++前端中的 Autograd¶ # C ++前端中的 Autograd¶
> 原文: [https://pytorch.org/tutorials/advanced/cpp_autograd.html](https://pytorch.org/tutorials/advanced/cpp_autograd.html) > 原文:<https://pytorch.org/tutorials/advanced/cpp_autograd.html>
`autograd`软件包对于在 PyTorch 中构建高度灵活和动态的神经网络至关重要。 PyTorch Python 前端中的大多数 autograd API 也可以在 C ++前端中使用,从而可以轻松地将 autograd 代码从 Python 转换为 C ++。 `autograd`软件包对于在 PyTorch 中构建高度灵活和动态的神经网络至关重要。 PyTorch Python 前端中的大多数 autograd API 也可以在 C ++前端中使用,从而可以轻松地将 autograd 代码从 Python 转换为 C ++。
......
# 在 C ++中注册分派的运算符 # 在 C ++中注册分派的运算符
> 原文: [https://pytorch.org/tutorials/advanced/dispatcher.html](https://pytorch.org/tutorials/advanced/dispatcher.html) > 原文:<https://pytorch.org/tutorials/advanced/dispatcher.html>
调度程序是 PyTorch 的内部组件,负责确定调用`torch::add`之类的函数时应实际运行哪些代码。 这是不平凡的,因为 PyTorch 操作需要处理很多交叉关注点,这些关注点“层叠”在另一个之上。 以下是其处理的一些示例: 调度程序是 PyTorch 的内部组件,负责确定调用`torch::add`之类的函数时应实际运行哪些代码。 这是不平凡的,因为 PyTorch 操作需要处理很多交叉关注点,这些关注点“层叠”在另一个之上。 以下是其处理的一些示例:
......
# 分析您的 PyTorch 模块¶ # 分析您的 PyTorch 模块¶
> 原文: [https://pytorch.org/tutorials/beginner/profiler.html](https://pytorch.org/tutorials/beginner/profiler.html) > 原文:<https://pytorch.org/tutorials/beginner/profiler.html>
**作者:** [Suraj Subramanian](https://github.com/suraj813) **作者:** [Suraj Subramanian](https://github.com/suraj813)
......
# 使用 Ray Tune 进行超参数调整¶ # 使用 Ray Tune 进行超参数调整¶
> 原文: [https://pytorch.org/tutorials/beginner/hyperparameter_tuning_tutorial.html](https://pytorch.org/tutorials/beginner/hyperparameter_tuning_tutorial.html) > 原文:<https://pytorch.org/tutorials/beginner/hyperparameter_tuning_tutorial.html>
超参数调整可以使平均模型与高精度模型有所不同。 通常,选择不同的学习率或更改网络层大小等简单的事情可能会对模型性能产生巨大影响。 超参数调整可以使平均模型与高精度模型有所不同。 通常,选择不同的学习率或更改网络层大小等简单的事情可能会对模型性能产生巨大影响。
......
# 修剪教程¶ # 修剪教程¶
> 原文: [https://pytorch.org/tutorials/intermediate/pruning_tutorial.html](https://pytorch.org/tutorials/intermediate/pruning_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/pruning_tutorial.html>
**作者**[Michela Paganini](https://github.com/mickypaganini) **作者**[Michela Paganini](https://github.com/mickypaganini)
......
# LSTM 单词语言模型上的(beta)动态量化 # LSTM 单词语言模型上的(beta)动态量化
> 原文: [https://pytorch.org/tutorials/advanced/dynamic_quantization_tutorial.html](https://pytorch.org/tutorials/advanced/dynamic_quantization_tutorial.html) > 原文:<https://pytorch.org/tutorials/advanced/dynamic_quantization_tutorial.html>
**作者**[James Reed](https://github.com/jamesr66a) **作者**[James Reed](https://github.com/jamesr66a)
......
# Beta 上的 BERT 动态量化 # Beta 上的 BERT 动态量化
> 原文: [https://pytorch.org/tutorials/intermediate/dynamic_quantization_bert_tutorial.html](https://pytorch.org/tutorials/intermediate/dynamic_quantization_bert_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/dynamic_quantization_bert_tutorial.html>
小费 小费
......
# (beta)在 PyTorch 中使用 Eager 模式进行静态量化¶ # (beta)在 PyTorch 中使用 Eager 模式进行静态量化¶
> 原文: [https://pytorch.org/tutorials/advanced/static_quantization_tutorial.html#](https://pytorch.org/tutorials/advanced/static_quantization_tutorial.html#) > 原文:<https://pytorch.org/tutorials/advanced/static_quantization_tutorial.html#>
**作者**[Raghuraman Krishnamoorthi](https://github.com/raghuramank100) **作者**[Raghuraman Krishnamoorthi](https://github.com/raghuramank100)
......
# (beta)计算机视觉教程的量化转移学习¶ # (beta)计算机视觉教程的量化转移学习¶
> 原文: [https://pytorch.org/tutorials/intermediate/quantized_transfer_learning_tutorial.html](https://pytorch.org/tutorials/intermediate/quantized_transfer_learning_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/quantized_transfer_learning_tutorial.html>
小费 小费
......
# PyTorch 分布式概述¶ # PyTorch 分布式概述¶
> 原文: [https://pytorch.org/tutorials/beginner/dist_overview.html](https://pytorch.org/tutorials/beginner/dist_overview.html) > 原文:<https://pytorch.org/tutorials/beginner/dist_overview.html>
**作者**[申力](https://mrshenli.github.io/) **作者**[申力](https://mrshenli.github.io/)
......
# 单机模型并行最佳实践¶ # 单机模型并行最佳实践¶
> 原文: [https://pytorch.org/tutorials/intermediate/model_parallel_tutorial.html](https://pytorch.org/tutorials/intermediate/model_parallel_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/model_parallel_tutorial.html>
**作者**[申力](https://mrshenli.github.io/) **作者**[申力](https://mrshenli.github.io/)
......
# 分布式数据并行入门¶ # 分布式数据并行入门¶
> 原文: [https://pytorch.org/tutorials/intermediate/ddp_tutorial.html](https://pytorch.org/tutorials/intermediate/ddp_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/ddp_tutorial.html>
**作者**[申力](https://mrshenli.github.io/) **作者**[申力](https://mrshenli.github.io/)
......
# 用 PyTorch 编写分布式应用程序 # 用 PyTorch 编写分布式应用程序
> 原文: [https://pytorch.org/tutorials/intermediate/dist_tuto.html](https://pytorch.org/tutorials/intermediate/dist_tuto.html) > 原文:<https://pytorch.org/tutorials/intermediate/dist_tuto.html>
**作者**[SébArnold](https://seba1511.com) **作者**[SébArnold](https://seba1511.com)
......
# 分布式 RPC 框架入门¶ # 分布式 RPC 框架入门¶
> 原文: [https://pytorch.org/tutorials/intermediate/rpc_tutorial.html](https://pytorch.org/tutorials/intermediate/rpc_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/rpc_tutorial.html>
**作者**[申力](https://mrshenli.github.io/) **作者**[申力](https://mrshenli.github.io/)
......
# 使用分布式 RPC 框架实现参数服务器¶ # 使用分布式 RPC 框架实现参数服务器¶
> 原文: [https://pytorch.org/tutorials/intermediate/rpc_param_server_tutorial.html](https://pytorch.org/tutorials/intermediate/rpc_param_server_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/rpc_param_server_tutorial.html>
**作者**[Rohan Varma](https://github.com/rohan-varma) **作者**[Rohan Varma](https://github.com/rohan-varma)
......
# 使用 RPC 的分布式管道并行化 # 使用 RPC 的分布式管道并行化
> 原文: [https://pytorch.org/tutorials/intermediate/dist_pipeline_parallel_tutorial.html](https://pytorch.org/tutorials/intermediate/dist_pipeline_parallel_tutorial.html) > 原文:<https://pytorch.org/tutorials/intermediate/dist_pipeline_parallel_tutorial.html>
**作者**[申力](https://mrshenli.github.io/) **作者**[申力](https://mrshenli.github.io/)
......
# 使用异步执行实现批处理 RPC 处理 # 使用异步执行实现批处理 RPC 处理
> 原文: [https://pytorch.org/tutorials/intermediate/rpc_async_execution.html](https://pytorch.org/tutorials/intermediate/rpc_async_execution.html) > 原文:<https://pytorch.org/tutorials/intermediate/rpc_async_execution.html>
**作者**[申力](https://mrshenli.github.io/) **作者**[申力](https://mrshenli.github.io/)
......
# 将分布式 DataParallel 与分布式 RPC 框架相结合¶ # 将分布式 DataParallel 与分布式 RPC 框架相结合¶
> 原文: [https://pytorch.org/tutorials/advanced/rpc_ddp_tutorial.html](https://pytorch.org/tutorials/advanced/rpc_ddp_tutorial.html) > 原文:<https://pytorch.org/tutorials/advanced/rpc_ddp_tutorial.html>
**作者**[Pritam Damania](https://github.com/pritamdamania87) **作者**[Pritam Damania](https://github.com/pritamdamania87)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册