Skip to content

Commit 207cdb1

Browse files
authored
Only fix signature
1 parent 35a8b49 commit 207cdb1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/lightning/pytorch/core/module.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,17 @@ def all_gather(
675675
all_gather = self.trainer.strategy.all_gather
676676
data = convert_to_tensors(data, device=self.device)
677677
return apply_to_collection(data, Tensor, all_gather, group=group, sync_grads=sync_grads)
678+
679+
@override
680+
def forward(self, *inputs) -> Any:
681+
r"""Same as :meth:`torch.nn.Module.forward`.
682+
Args:
683+
*args: Whatever you decide to pass into the forward method.
684+
**kwargs: Keyword arguments are also possible.
685+
Return:
686+
Your model's output
687+
"""
688+
return super().forward(*inputs)
678689

679690
def training_step(self, *args: Any, **kwargs: Any) -> STEP_OUTPUT:
680691
r"""Here you compute and return the training loss and some additional metrics for e.g. the progress bar or

0 commit comments

Comments
 (0)