Skip to content
Discussion options

You must be logged in to vote

Maybe the prediction api can help you (currently beta, will be released in version 1.3).

You can have multiple predict dataloaders (your different test data). If you do

predictions = trainer.predict(model, predict_dataloaders=[data1, data2, data3, ...])

and it returns the predictions grouped by the dataloader index. Then you can combine them with your own function.

final_predictions=combinePredictions(predictions)

Not sure if this is 100% what you are looking for, but it can at least eliminate that one for loop you have.
Optionally, you can also override predict_step in the LightningModule.
If you install the latest version, you can use this predict feature already. The documentation will…

Replies: 1 comment

Comment options

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