-
Notifications
You must be signed in to change notification settings - Fork 373
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
Problem training with standard dataloader. #1426
Comments
The issue is that some of the sample values returned by GeoDataset can't be automatically collated by PyTorch (BoundingBox, CRS). Our solution for our builtin data modules is to remove these values before loading: https://github.com/microsoft/torchgeo/blob/v0.4.1/torchgeo/datamodules/geo.py#L280 My suggestion would be to write a simple data module (there are dozens of builtin examples) and use that instead of directly using a data loader. Maybe this is something we could add to our collation functions... |
Is this still an issue or can this be closed? |
I've made a CustomGeoDatamodule like this:
To solve my problem. |
I've also encountered this problem, and it's taken me a while to find the solution. Definitely +1 for adding this as a feature of torchgeo to make this as seamless as possible for the end-users using GeoDatasets. Cheers, |
Reopening as a reminder to try to upstream some of our changes to PyTorch. |
Description
I've just learnt about Torchgeo and got interested in using it. So, I created a Kaggle notebook to test it with NAIP and Chesapeake data (Torchgeo 101).
When I try to train a segmentation task, I get the following error:
ValueError: A frozen dataclass was passed to `apply_to_collection` but this is not allowed.
Steps to reproduce
Version
0.4.1
The text was updated successfully, but these errors were encountered: