Skip to content

Commit 599d12c

Browse files
committed
fix typo in constrain_as_* examples
1 parent 18ea407 commit 599d12c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intermediate_source/torch_export_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def constraints_example4(x, y):
423423
exported_constraints_example4 = export(constraints_example4, (torch.randn(3, 3), torch.tensor([4])))
424424
print(exported_constraints_example4(torch.randn(3, 3), torch.tensor([5])))
425425
try:
426-
exported_constraints_example4(torch.randn(3, 3), torch.randn([2]))
426+
exported_constraints_example4(torch.randn(3, 3), torch.tensor([2]))
427427
except Exception:
428428
tb.print_exc()
429429

@@ -441,7 +441,7 @@ def constraints_example5(x, y):
441441
exported_constraints_example5 = export(constraints_example5, (torch.randn(2, 2), torch.tensor([4])))
442442
print(exported_constraints_example5(torch.randn(2, 2), torch.tensor([5])))
443443
try:
444-
exported_constraints_example5(torch.randn(2, 2), torch.randn([1]))
444+
exported_constraints_example5(torch.randn(2, 2), torch.tensor([1]))
445445
except Exception:
446446
tb.print_exc()
447447

0 commit comments

Comments
 (0)