Skip to content

Commit e72255a

Browse files
author
SplitInfinity
authored
[TorchScript] Fix archive file extension in tutorials (#1310)
**Summary** Tutorials, documentation and comments are not consistent with the file extension they use for JIT archives. This commit modifies certain instances of `*.pth` in `torch.jit.save` calls with `*.pt`. **Test Plan** Continuous integration. **Fixes** This commit fixes #49660 in the pytorch/pytorch repository.
1 parent c5fe766 commit e72255a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beginner_source/Intro_to_TorchScript_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@ def forward(self, xs):
368368
# process. Let’s save and load our wrapped RNN module:
369369
#
370370

371-
traced.save('wrapped_rnn.zip')
371+
traced.save('wrapped_rnn.pt')
372372

373-
loaded = torch.jit.load('wrapped_rnn.zip')
373+
loaded = torch.jit.load('wrapped_rnn.pt')
374374

375375
print(loaded)
376376
print(loaded.code)

0 commit comments

Comments
 (0)