Skip to content

Commit 111f2d5

Browse files
authored
Merge branch 'master' into forward-ad-tutorial
2 parents f345d2f + c2115df commit 111f2d5

20 files changed

+3932
-9
lines changed

advanced_source/dispatcher.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ speaking, the structure of your registrations will look like this:
109109
For operators that do not need autograd
110110
---------------------------------------
111111

112-
Note: This section only applies to versions of PyTorch ``>= 3.10``.
112+
Note: This section only applies to versions of PyTorch ``>= 1.10``.
113113

114114
In the next section, we will discuss how to add autograd support to an operator.
115115
But for the ops that do not need autograd support, the following kernel should be

beginner_source/basics/buildmodel_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
# continue to use the CPU.
3939

4040
device = 'cuda' if torch.cuda.is_available() else 'cpu'
41-
print('Using {} device'.format(device))
41+
print(f'Using {device} device')
4242

4343
##############################################
4444
# Define the Class

beginner_source/basics/data_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def __getitem__(self, idx):
160160

161161

162162
def __init__(self, annotations_file, img_dir, transform=None, target_transform=None):
163-
self.img_labels = pd.read_csv(annotations_file)
163+
self.img_labels = pd.read_csv(annotations_file, names=['file_name', 'label'])
164164
self.img_dir = img_dir
165165
self.transform = transform
166166
self.target_transform = target_transform

beginner_source/basics/quickstart_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090
# Get cpu or gpu device for training.
9191
device = "cuda" if torch.cuda.is_available() else "cpu"
92-
print("Using {} device".format(device))
92+
print(f"Using {device} device")
9393

9494
# Define model
9595
class NeuralNetwork(nn.Module):

beginner_source/examples_autograd/polynomial_custom_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
r"""
2+
"""
33
PyTorch: Defining New autograd Functions
44
----------------------------------------
55

beginner_source/introyt.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
`Introduction <introyt/introyt1_tutorial.html>`_ ||
2+
`Tensors <introyt/tensors_deeper_tutorial.html>`_ ||
3+
`Autograd <introyt/autogradyt_tutorial.html>`_ ||
4+
`Building Models <introyt/modelsyt_tutorial.html>`_ ||
5+
`TensorBoard Support <introyt/tensorboardyt_tutorial.html>`_ ||
6+
`Training Models <introyt/trainingyt.html>`_ ||
7+
`Model Understanding <introyt/captumyt.html>`_
8+
9+
Introduction to PyTorch - YouTube Series
10+
========================================
11+
12+
Authors:
13+
`Brad Heintz <https://github.com/fbbradheintz>`_
14+
15+
This tutorial follows along with the `PyTorch Beginner Series <https://www.youtube.com/playlist?list=PL_lsbAsL_o2CTlGHgMxNrKhzP97BaG9ZN>`_ on youtube.
16+
17+
`This tutorial assumes a basic familiarity with Python and Deep Learning concepts.`
18+
19+
Running the Tutorial Code
20+
-------------------------
21+
You can run this tutorial in a couple of ways:
22+
23+
- **In the cloud**: This is the easiest way to get started! Each section has a Colab link at the top, which opens a notebook with the code in a fully-hosted environment. Pro tip: Use Colab with a GPU runtime to speed up operations *Runtime > Change runtime type > GPU*
24+
- **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.
25+
26+
.. include:: /beginner_source/introyt/tocyt.txt
27+
28+
.. toctree::
29+
:hidden:

beginner_source/introyt/README.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Introduction to PyTorch on YouTube
2+
----------------------------------
3+
4+
1. introyt.rst
5+
Introduction to PyTorch - Youtube Series
6+
https://pytorch.org/tutorials/beginner/introyt/introyt.html
7+
8+
2. introyt1_tutorial.py
9+
Introduction to PyTorch
10+
https://pytorch.org/tutorials/beginner/introyt/introyt1_tutorial.html
11+
12+
3. tensors_deeper_tutorial.py
13+
PyTorch Tensors
14+
https://pytorch.org/tutorials/beginner/introyt/tensors_deeper_tutorial.html
15+
16+
4. autogradyt_tutorial.py
17+
The Fundamentals of Autograd
18+
https://pytorch.org/tutorials/beginner/introyt/autogradyt_tutorial.html
19+
20+
5. modelsyt_tutorial.py
21+
Building Models with PyTorch
22+
https://pytorch.org/tutorials/beginner/introyt/modelsyt_tutorial.html
23+
24+
6. tensorboardyt_tutorial.py
25+
PyTorch TensorBoard Support
26+
https://pytorch.org/tutorials/beginner/introyt/tensorboardyt_tutorial.html
27+
28+
7. trainingyt_tutorial.py
29+
Training with PyTorch
30+
https://pytorch.org/tutorials/beginner/introyt/trainingyt_tutorial.html
31+
32+
8. captumyt_tutorial.py
33+
Model Understanding with Captum
34+
https://pytorch.org/tutorials/beginner/introyt/captumyt_tutorial.html

0 commit comments

Comments
 (0)