Skip to content

Commit e21f0cc

Browse files
committed
fix: move check_inputs if available during to_torchscript.
1 parent 63c2e69 commit e21f0cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lightning/pytorch/core/module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,8 +1473,8 @@ def forward(self, x):
14731473
example_inputs = self.example_input_array
14741474

14751475
if kwargs.get("check_inputs") is not None:
1476-
check_inputs = self._on_before_batch_transfer(kwargs["check_inputs"])
1477-
kwargs["check_inputs"] = self._apply_batch_transfer_handler(check_inputs)
1476+
kwargs["check_inputs"] = self._on_before_batch_transfer(kwargs["check_inputs"])
1477+
kwargs["check_inputs"] = self._apply_batch_transfer_handler(kwargs["check_inputs"])
14781478

14791479
# automatically send example inputs to the right device and use trace
14801480
example_inputs = self._on_before_batch_transfer(example_inputs)

0 commit comments

Comments
 (0)