Skip to content
Discussion options

You must be logged in to vote

Hi @talhaanwarch, in order to get predictions from a data loader you need to implement predict_step in your LightningModule (docs here: https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_module.html#predict-step). You would then be able to call Trainer.predict with the dataloader you want use following the API here: https://pytorch-lightning.readthedocs.io/en/stable/api/pytorch_lightning.trainer.trainer.html#pytorch_lightning.trainer.trainer.Trainer.predict

Hope that helps 😃

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@talhaanwarch
Comment options

@ethanwharris
Comment options

@talhaanwarch
Comment options

@ethanwharris
Comment options

Answer selected by Borda
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment