Skip to content

Commit 490e10c

Browse files
authored
Merge branch 'main' into docathon-3877-modernize-neural-networks
2 parents 53dd89f + 1655d0a commit 490e10c

7 files changed

Lines changed: 843 additions & 31 deletions

File tree

beginner_source/examples_tensor/polynomial_tensor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919
"""
2020

2121
import torch
22-
import math
23-
2422

2523
dtype = torch.float
2624
device = torch.device("cpu")
2725
# device = torch.device("cuda:0") # Uncomment this to run on GPU
2826

2927
# Create random input and output data
30-
x = torch.linspace(-math.pi, math.pi, 2000, device=device, dtype=dtype)
28+
x = torch.linspace(-torch.pi, torch.pi, 2000, device=device, dtype=dtype)
3129
y = torch.sin(x)
3230

3331
# Randomly initialize weights

beginner_source/introyt/captumyt.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,7 @@
106106
- Matplotlib version 3.3.4, since Captum currently uses a Matplotlib
107107
function whose arguments have been renamed in later versions
108108
109-
To install Captum in an Anaconda or pip virtual environment, use the
110-
appropriate command for your environment below:
111-
112-
With ``conda``:
113-
114-
.. code-block:: sh
115-
116-
conda install pytorch torchvision captum flask-compress matplotlib=3.3.4 -c pytorch
117-
118-
With ``pip``:
109+
To install Captum in a virtual environment, use:
119110
120111
.. code-block:: sh
121112

beginner_source/introyt/tensorboardyt_tutorial.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424
To run this tutorial, you’ll need to install PyTorch, TorchVision,
2525
Matplotlib, and TensorBoard.
2626
27-
With ``conda``:
28-
29-
.. code-block:: sh
30-
31-
conda install pytorch torchvision -c pytorch
32-
conda install matplotlib tensorboard
33-
3427
With ``pip``:
3528
3629
.. code-block:: sh

index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ Welcome to PyTorch Tutorials
103103
:link: intermediate/pinmem_nonblock.html
104104
:tags: Getting-Started
105105

106+
.. customcarditem::
107+
:header: Data Loading Optimization in PyTorch
108+
:card_description: Optimize DataLoader configuration with num_workers, pin_memory, persistent_workers for maximum training throughput.
109+
:image: _static/img/thumbnails/cropped/generic-pytorch-logo.png
110+
:link: intermediate/intermediate_data_loading_tutorial.html
111+
:tags: Getting-Started,Best-Practice
112+
106113
.. customcarditem::
107114
:header: Understanding requires_grad, retain_grad, Leaf, and Non-leaf Tensors
108115
:card_description: Learn the subtleties of requires_grad, retain_grad, leaf, and non-leaf tensors

0 commit comments

Comments
 (0)