diff --git a/beginner_source/Intro_to_TorchScript_tutorial.py b/beginner_source/Intro_to_TorchScript_tutorial.py index d369c4fbf80..21ee32ff384 100644 --- a/beginner_source/Intro_to_TorchScript_tutorial.py +++ b/beginner_source/Intro_to_TorchScript_tutorial.py @@ -33,6 +33,7 @@ import torch # This is all you need to use both PyTorch and TorchScript! print(torch.__version__) +torch.manual_seed(191009) # set the seed for reproducibility ###################################################################### @@ -308,7 +309,7 @@ def forward(self, x, h): # New inputs x, h = torch.rand(3, 4), torch.rand(3, 4) -traced_cell(x, h) +print(scripted_cell(x, h)) ######################################################################