I don’t think the issue is created by the sizes/length of the datasets.
Were you able to narrow down which transformation could potentially cause the issue?
Are you using torchvision.transforms or any other library?