pytorch官方教程-中文-LEARN THE BASICS
LEARN THE BASICS 学习基础知识
Authors: Suraj Subramanian, Seth Juarez, Cassie Breviu, Dmitry Soshnikov, Ari Bornstein
Most machine learning workflows involve working with data, creating models, optimizing model parameters, and saving the trained models.
大多数机器学习工作流程涉及处理数据、创建模型、优化模型参数和保存训练模型。This tutorial introduces you to a complete ML workflow implemented in PyTorch, with links to learn more about each of these concepts.
本教程向您介绍了在PyTorch中实现的完整ML工作流,并提供了详细了解这些概念的链接。
We’ll use the FashionMNIST dataset to train a neural network that predicts if an input image belongs to one of the following classes: T-shirt/top, Trouser, Pullover, Dress, Coat, Sandal, Shirt, Sneaker, Bag, or Ankle boot.
我们将使用FashionMNIST数据集训练神经网络,预测输入图像是否属于以下类别之一:T恤/上衣、裤子、套头衫、连衣裙、外套、凉鞋、衬衫、运动鞋、包包或高帮靴。
This tutorial assumes a basic familiarity with Python and Deep Learning concepts.
本教程假定您基本熟悉Python和深度学习概念。
Running the Tutorial Code[]
运行教程代码
(https://pytorch.org/tutorials/beginner/basics/intro.html#running-the-tutorial-code)
You can run this tutorial in a couple of ways:
您可以通过以下几种方式运行本教程:
-
In the cloud: This is the easiest way to get started! Each section has a “Run in Microsoft Learn” link at the top, which opens an integrated notebook in Microsoft Learn with the code in a fully-hosted environment.
云端:这是最简单的入门方式!每个部分的顶部都有一个“在Microsoft Learn中运行”链接,该链接将在完全托管的环境中打开Microsoft Learn的集成笔记本和代码。 -
Locally: This option requires you to setup PyTorch and TorchVision first on your local machine (installation instructions). Download the notebook or copy the code into your favorite IDE.
本地:此选项要求您首先在本地计算机上设置PyTorch和TorchVision(安装说明)。下载笔记本或将代码复制到您喜爱的IDE中。
How to Use this Guide
如何使用本指南
If you’re familiar with other deep learning frameworks, check out the 0. Quickstart first to quickly familiarize yourself with PyTorch’s API.
如果您熟悉其他深度学习框架,请先查看0.Quickstart以快速熟悉PyTorch的API。
If you’re new to deep learning frameworks, head right into the first section of our step-by-step guide: 1. Tensors.
如果您是深度学习框架的新手,请直接进入我们的分步指南的第一部分:1.张量。
- Quickstart 快速启动
- Tensors 张量
- Datasets and DataLoaders 数据集合数据加载器
- Transforms 转换
- Build Model 构建模型
- Automatic Differentiation 自动区分
- Optimization Loop 优化回路
- Save, Load and Use Model 保存、加载和使用模型
Total running time of the script: ( 0 minutes 0.000 seconds)
脚本的总运行时间:(0分0.000秒)