Thanks for the hint, @ptrblck. The requested shapes are:
IMAGES: shape =  torch.Size([5, 3, 420, 360]) , min =  tensor(0., device='cuda:0') , max =  tensor(0.9765, device='cuda:0') , type =  torch.cuda.FloatTensor
MASK_0: shape =  torch.Size([1, 420, 360])    , min =  tensor(0., device='cuda:0') , max =  tensor(0.0157, device='cuda:0') , type =  torch.cuda.FloatTensor
MASK_1: shape =  torch.Size([1, 420, 360])    , min =  tensor(0., device='cuda:0') , max =  tensor(0.0078, device='cuda:0') , type =  torch.cuda.FloatTensor
MASK_2: shape =  torch.Size([1, 420, 360])    , min =  tensor(0., device='cuda:0') , max =  tensor(0.0078, device='cuda:0') , type =  torch.cuda.FloatTensor
MASK_3: shape =  torch.Size([1, 420, 360])    , min =  tensor(0., device='cuda:0') , max =  tensor(0.0078, device='cuda:0') , type =  torch.cuda.FloatTensor
MASK_4: shape =  torch.Size([1, 420, 360])    , min =  tensor(0., device='cuda:0') , max =  tensor(0.0078, device='cuda:0') , type =  torch.cuda.FloatTensor


This enabled me to identify the origin of the error, which for this snippet was to multiply both images and masks by 255. Hence, obtaining:
IMAGES: shape =  torch.Size([5, 3, 420, 360]) , min =  tensor(0., device='cuda:0') , max =  tensor(249., device='cuda:0') , type =  torch.cuda.FloatTensor
MASK_0: shape =  torch.Size([1, 420, 360])    , min =  tensor(0., device='cuda:0') , max =  tensor(4., device='cuda:0')   , type =  torch.cuda.FloatTensor
MASK_1: shape =  torch.Size([1, 420, 360])    , min =  tensor(0., device='cuda:0') , max =  tensor(2., device='cuda:0')   , type =  torch.cuda.FloatTensor
MASK_2: shape =  torch.Size([1, 420, 360])    , min =  tensor(0., device='cuda:0') , max =  tensor(2., device='cuda:0')   , type =  torch.cuda.FloatTensor
MASK_3: shape =  torch.Size([1, 420, 360])    , min =  tensor(0., device='cuda:0') , max =  tensor(2., device='cuda:0')   , type =  torch.cuda.FloatTensor
MASK_4: shape =  torch.Size([1, 420, 360])    , min =  tensor(0., device='cuda:0') , max =  tensor(2., device='cuda:0')   , type =  torch.cuda.FloatTensor


Which yields no error.
I have adjusted my code to comply with the correct expected ranges and types, however the backward propagation within lightning still fails.
Any suggestion?