Hello,
Thank you for you help.
Yes I tried using a batch size of 1 but I got the same error.
I think the problem comes from the fact that a patch of dimension 256x256 is too important so I used transforms.CenterCrop with a size of 32 and that solved the problem.