Hi,
Your custom dataset does not have images with same shape. You can add a Resize
as a transform in your dataloader so all images can be stacked to each other when dataloader tries to create a batch.
You can use following transform instead:
tfs = transforms.Compose([
transforms.Resize(img_size),
transforms.ToTensor(),
# normalize,
])
Bests