RuntimeError: Caught RuntimeError in DataLoader worker process 0. &RuntimeError: Trying to resize storage that is not resizable #18476
Closed
Unanswered
1994cxy
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
I found the solution |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wrote a LightningDataModule for the MSCOCO dataset and implemented init, setup, train_dataloader, val_dataloader, and test_dataloader. And in the setup func, I instance a torch.utils.data.Dataset which will resize mscoco img to (128, 128) in the getitem func:
The self.transform=transforms.Compose([transforms.ToTensor(), transforms.Resize((128, 128))]), and the train_dataloader goes to:
My torch.utils.data.Dataset works well with dataloader and can get the right output. But it has errors in the LightningDataModule:
What should I do?
Beta Was this translation helpful? Give feedback.
All reactions