Skip to content

Commit b4d74d5

Browse files
authored
Merge branch 'main' into add_coding_ddpg
2 parents 3a21bca + 1fe4025 commit b4d74d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
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
######################################################################

0 commit comments

Comments
 (0)