-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InriaAerialImageLabelingDataModule: fix predict dimensions #975
Conversation
trainer.predict(model=model, dataloaders=datamodule.val_dataloader()) | ||
|
||
if hasattr(datamodule, "predict_dataset"): | ||
trainer.predict(model=model, datamodule=datamodule) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only reason we run predict on the val set instead of the predict set is because not all datamodules have a predict set. In order to get 100% coverage, we ran everything on val instead. However, at least for segmentation, we do have a predict set, so we should use it. This is how I discovered the bug to begin with.
Can't think of a way to support both. Adding the number of patches to the sample dict as suggested in my comment will allow reshaping prior to |
…#975) * InriaAerialImageLabelingDataModule: fix predict dimensions * Record number of patches for reconstruction
Previously, the following code would fail due to an extra dimension in predict samples:
This is now fixed and properly tested with a real trainer. I also removed the inria datamodule tests since they aren't useful.