 Add a `Trainer.predict()`, similar to `Trainer.test()`, except returns the predictions
🚀 Feature
Add a Trainer.predict(), similar to Trainer.test(), that returns the predictions
Motivation
I want to get prediction, without writing for batch in ..., to(cuda), output.append() ...
Pitch
Making prediction should be part of a LightningModule "system".
And it should be easy to add this functionality.
Alternatives
Currently the doc suggests to make prediction like normal PyTorch:
https://pytorch-lightning.readthedocs.io/en/latest/trainer.html#deployment-prediction
Additional context
Related forum post: https://forums.pytorchlightning.ai/t/save-test-predictions/549/3