yes I guess the easiest option here is to make a try/except in the DataLoader to discard full batches that cause errors. Would you know how to do that? I cannot find resources for custom DataLoader class creation (this page is named " Developing Custom PyTorch Dataloaders" but customizes only dataset and transforms, not the dataloader class itself)