2.3 PyTroch Basics
Learn the PyTorch Basics!
Created Date: 2025-05-10
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.
We’ll use the MNIST dataset to train a neural network that predicts if an input image belongs to one of the ten digit classes (0 through 9).
This tutorial assumes a basic familiarity with Python and Deep Learning concepts.
2.3.1 Quickstart
This section runs through the API for common tasks in machine learning. Refer to the links in each section to dive deeper.
Shape of X [N, C, H, W]: torch.Size([64, 1, 28, 28]) Shape of y: torch.Size([64]) torch.int64