Skip to content

Commit

Permalink
self.forward to self
Browse files Browse the repository at this point in the history
  • Loading branch information
lezwon authored and Borda committed Jul 28, 2020
1 parent a675cb8 commit eb9b6e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytorch_lightning/core/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,8 @@ def to_onnx(self, file_path: str, input_sample: Optional[Tensor] = None, **kwarg

if 'example_outputs' not in kwargs:
self.eval()
kwargs['example_outputs'] = self.forward(input_data)
kwargs['example_outputs'] = self(input_data)

torch.onnx.export(self, input_data, file_path, **kwargs)

@property
Expand Down

0 comments on commit eb9b6e4

Please sign in to comment.