CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
pytorch

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: pytorch/tutorials
Path: blob/main/beginner_source/basics/intro.py
Views: 494
1
"""
2
**Learn the Basics** ||
3
`Quickstart <quickstart_tutorial.html>`_ ||
4
`Tensors <tensorqs_tutorial.html>`_ ||
5
`Datasets & DataLoaders <data_tutorial.html>`_ ||
6
`Transforms <transforms_tutorial.html>`_ ||
7
`Build Model <buildmodel_tutorial.html>`_ ||
8
`Autograd <autogradqs_tutorial.html>`_ ||
9
`Optimization <optimization_tutorial.html>`_ ||
10
`Save & Load Model <saveloadrun_tutorial.html>`_
11
12
Learn the Basics
13
===================
14
15
Authors:
16
`Suraj Subramanian <https://github.com/suraj813>`_,
17
`Seth Juarez <https://github.com/sethjuarez/>`_,
18
`Cassie Breviu <https://github.com/cassieview/>`_,
19
`Dmitry Soshnikov <https://soshnikov.com/>`_,
20
`Ari Bornstein <https://github.com/aribornstein/>`_
21
22
Most machine learning workflows involve working with data, creating models, optimizing model
23
parameters, and saving the trained models. This tutorial introduces you to a complete ML workflow
24
implemented in PyTorch, with links to learn more about each of these concepts.
25
26
We'll use the FashionMNIST dataset to train a neural network that predicts if an input image belongs
27
to one of the following classes: T-shirt/top, Trouser, Pullover, Dress, Coat, Sandal, Shirt, Sneaker,
28
Bag, or Ankle boot.
29
30
`This tutorial assumes a basic familiarity with Python and Deep Learning concepts.`
31
32
33
Running the Tutorial Code
34
-------------------------
35
You can run this tutorial in a couple of ways:
36
37
- **In the cloud**: This is the easiest way to get started! Each section has a "Run in Microsoft Learn" and "Run in Google Colab" link at the top, which opens an integrated notebook in Microsoft Learn or Google Colab, respectively, with the code in a fully-hosted environment.
38
- **Locally**: This option requires you to setup PyTorch and TorchVision first on your local machine (`installation instructions <https://pytorch.org/get-started/locally/>`_). Download the notebook or copy the code into your favorite IDE.
39
40
41
How to Use this Guide
42
---------------------
43
If you're familiar with other deep learning frameworks, check out the `0. Quickstart <quickstart_tutorial.html>`_ first
44
to quickly familiarize yourself with PyTorch's API.
45
46
If you're new to deep learning frameworks, head right into the first section of our step-by-step guide: `1. Tensors <tensor_tutorial.html>`_.
47
48
49
.. include:: /beginner_source/basics/qs_toc.txt
50
51
.. toctree::
52
:hidden:
53
54
"""
55
56