Skip to content

Commit 1380e73

Browse files
author
Svetlana Karslioglu
authored
Merge branch 'master' into jingxu10/itt
2 parents a51fea0 + 72716e6 commit 1380e73

File tree

9 files changed

+24
-12
lines changed

9 files changed

+24
-12
lines changed

beginner_source/blitz/cifar10_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def imshow(img):
105105

106106
# get some random training images
107107
dataiter = iter(trainloader)
108-
images, labels = dataiter.next()
108+
images, labels = next(dataiter)
109109

110110
# show images
111111
imshow(torchvision.utils.make_grid(images))
@@ -210,7 +210,7 @@ def forward(self, x):
210210
# Okay, first step. Let us display an image from the test set to get familiar.
211211

212212
dataiter = iter(testloader)
213-
images, labels = dataiter.next()
213+
images, labels = next(dataiter)
214214

215215
# print images
216216
imshow(torchvision.utils.make_grid(images))

beginner_source/introyt/introyt1_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def imshow(img):
369369

370370
# get some random training images
371371
dataiter = iter(trainloader)
372-
images, labels = dataiter.next()
372+
images, labels = next(dataiter)
373373

374374
# show images
375375
imshow(torchvision.utils.make_grid(images))
@@ -446,7 +446,7 @@ def imshow(img):
446446

447447
# get some random training images
448448
dataiter = iter(trainloader)
449-
images, labels = dataiter.next()
449+
images, labels = next(dataiter)
450450

451451
# show images
452452
imshow(torchvision.utils.make_grid(images))

beginner_source/introyt/tensorboardyt_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def matplotlib_imshow(img, one_channel=False):
115115

116116
# Extract a batch of 4 images
117117
dataiter = iter(training_loader)
118-
images, labels = dataiter.next()
118+
images, labels = next(dataiter)
119119

120120
# Create a grid from the images and show them
121121
img_grid = torchvision.utils.make_grid(images)
@@ -242,7 +242,7 @@ def forward(self, x):
242242

243243
# Again, grab a single mini-batch of images
244244
dataiter = iter(training_loader)
245-
images, labels = dataiter.next()
245+
images, labels = next(dataiter)
246246

247247
# add_graph() will trace the sample input through your model,
248248
# and render it as a graph.

beginner_source/introyt/trainingyt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def matplotlib_imshow(img, one_channel=False):
112112
plt.imshow(np.transpose(npimg, (1, 2, 0)))
113113

114114
dataiter = iter(training_loader)
115-
images, labels = dataiter.next()
115+
images, labels = next(dataiter)
116116

117117
# Create a grid from the images and show them
118118
img_grid = torchvision.utils.make_grid(images)

index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,7 @@ Additional Resources
889889
intermediate/quantized_transfer_learning_tutorial
890890
advanced/static_quantization_tutorial
891891
intermediate/torchserve_with_ipex
892+
intermediate/torchserve_with_ipex_2
892893
intermediate/nvfuser_intro_tutorial
893894
intermediate/ax_multiobjective_nas_tutorial
894895

intermediate_source/nvfuser_intro_tutorial.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,16 @@ def primitive_definition_for_memory_efficient_fusion(
557557
#
558558
# .. figure:: /_static/img/nvfuser_intro/nvfuser_tutorial_5.png
559559
#
560-
# .. note:: FuncTorch’s memory efficient pass is still actively in development
561-
# and future versions are expected to achieve performance closer
562-
# to that of TorchScript with the composite definition.
560+
# .. note:: FuncTorch’s memory efficient pass is experimental and still
561+
# actively in development.
562+
# Future versions of the API are expected to achieve performance
563+
# closer to that of TorchScript with the composite definition.
564+
#
565+
# .. note:: FuncTorch’s memory efficient pass specializes on the shapes of
566+
# the inputs to the function. If new inputs are provided with
567+
# different shapes, then you need to construct a new function
568+
# using `memory_efficient_fusion` and apply it to the new inputs.
569+
563570

564571
######################################################################
565572
# Transformer Block With a Novel Normalization

intermediate_source/tensorboard_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ using `make_grid <https://pytorch.org/vision/stable/utils.html#torchvision.utils
144144
145145
# get some random training images
146146
dataiter = iter(trainloader)
147-
images, labels = dataiter.next()
147+
images, labels = next(dataiter)
148148
149149
# create grid of images
150150
img_grid = torchvision.utils.make_grid(images)

recipes_source/recipes/saving_multiple_models_in_one_file.py

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

5555

5656
######################################################################
57-
# 2. Define and intialize the neural network
57+
# 2. Define and initialize the neural network
5858
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5959
#
6060
# For sake of example, we will create a neural network for training

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ ax-platform
2929
nbformat>=4.2.0
3030
deep_phonemizer==0.0.17
3131

32+
# the following is necessary due to https://github.com/python/importlib_metadata/issues/411
33+
importlib-metadata < 5.0; python_version <= "3.7"
34+
importlib-metadata; python_version > "3.7"
35+
3236
# PyTorch Theme
3337
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
3438

0 commit comments

Comments
 (0)