[SOLUTION]
The image was a multi-level TIFF file. If the file level is not specified, the first level is taken by default. In this case, each first-level image was between 25 to 50MB, sometimes more. The Dataloader batch size needed to be reduced to 1 in order not to generate errors. In the end, I chose 2nd level images to train and test the model.
Blessings