Skip to content

Commit b3f07ce

Browse files
authored
Merge branch 'main' into main
2 parents 1b06939 + 1fe4025 commit b3f07ce

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

beginner_source/Intro_to_TorchScript_tutorial.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
import torch # This is all you need to use both PyTorch and TorchScript!
3535
print(torch.__version__)
36+
torch.manual_seed(191009) # set the seed for reproducibility
3637

3738

3839
######################################################################
@@ -308,7 +309,7 @@ def forward(self, x, h):
308309

309310
# New inputs
310311
x, h = torch.rand(3, 4), torch.rand(3, 4)
311-
traced_cell(x, h)
312+
print(scripted_cell(x, h))
312313

313314

314315
######################################################################

intermediate_source/seq2seq_translation_tutorial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
:alt:
4646
4747
To improve upon this model we'll use an `attention
48-
mechanism <https://arxiv.org/abs/1409.0473>`__, which lets the decoder
48+
mechanism <https://arxiv.org/abs/1508.04025>`__, which lets the decoder
4949
learn to focus over a specific range of the input sequence.
5050
5151
**Recommended Reading:**
@@ -66,8 +66,8 @@
6666
Statistical Machine Translation <https://arxiv.org/abs/1406.1078>`__
6767
- `Sequence to Sequence Learning with Neural
6868
Networks <https://arxiv.org/abs/1409.3215>`__
69-
- `Neural Machine Translation by Jointly Learning to Align and
70-
Translate <https://arxiv.org/abs/1409.0473>`__
69+
- `Effective Approaches to Attention-based Neural Machine
70+
Translation <https://arxiv.org/abs/1508.04025>`__
7171
- `A Neural Conversational Model <https://arxiv.org/abs/1506.05869>`__
7272
7373
You will also find the previous tutorials on

intermediate_source/torch_compile_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def forward(self, x):
105105
#
106106
# Let's now demonstrate that using ``torch.compile`` can speed
107107
# up real models. We will compare standard eager mode and
108-
# ``torch.compile`` by evaluating and training ResNet-18 on random data.
108+
# ``torch.compile`` by evaluating and training a ``torchvision`` model on random data.
109109
#
110110
# Before we start, we need to define some utility functions.
111111

0 commit comments

Comments
 (0)