

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# PyTorch 与 Amazon A SageMaker I 配合使用的资源
<a name="pytorch"></a>

您可以使用 Amazon SageMaker AI 使用自定义 PyTorch 代码训练和部署模型。 SageMaker AI Python SDK PyTorch 估算器和模型以及 SageMaker AI 开源 PyTorch 容器使编写 PyTorch 脚本和在 A SageMaker I 中运行脚本变得更加容易。以下部分提供了参考资料，您可以用来学习如何 PyTorch 与 SageMaker AI 配合使用。

## 您需要做什么？
<a name="pytorch-intent"></a>

我想在 SageMaker AI 中训练一个自定义 PyTorch 模型。  
要获取 Jupyter 笔记本的示例，请参阅 Amazon A SageMaker I [PyTorch 示例存储库中的示例 GitHub笔记本](https://github.com/awslabs/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk/pytorch_mnist)。  
有关文档，请参阅[使用训练模型 PyTorch](https://sagemaker.readthedocs.io/en/stable/using_pytorch.html#train-a-model-with-pytorch)。

我有一个在 SageMaker AI 中训练过的 PyTorch 模型，我想将其部署到托管端点。  
有关更多信息，请参阅[部署 PyTorch 模型](https://sagemaker.readthedocs.io/en/stable/using_pytorch.html#deploy-pytorch-models)。

我有一个在 SageMaker AI 之外训练的 PyTorch 模型，我想将其部署到 A SageMaker I 端点  
有关更多信息，请参阅[部署自己的 PyTorch 模型](https://sagemaker.readthedocs.io/en/stable/frameworks/pytorch/using_pytorch.html#bring-your-own-model)。

我想查看[亚马逊 SageMaker Python 软件开发工具包 PyTorch类的](https://sagemaker.readthedocs.io/en/stable) API 文档。  
有关更多信息，请参阅[PyTorch 类](https://sagemaker.readthedocs.io/en/stable/sagemaker.pytorch.html)。

我想找到 SageMaker AI PyTorch 容器存储库。  
有关更多信息，请参阅 [SageMaker AI PyTorch 容器 GitHub 存储库](https://github.com/aws/deep-learning-containers/tree/master/pytorch)。

我想查找有关 Dee AWS p Learning Containers 支持的 PyTorch 版本的信息。  
有关更多信息，请参阅[可用的深度学习容器映像](https://github.com/aws/deep-learning-containers/blob/master/available_images.md)。

 有关编写 PyTorch 训练脚本以及在 SageMaker AI 中使用 PyTorch估算器和模型的一般信息，请参阅与 [Pyth SageMaker on SDK PyTorch 配合使用](https://sagemaker.readthedocs.io/en/stable/using_pytorch.html)。