Negative loss with UNet

Could you check which loss function you are using and what the expected inputs are?
I would guess that either the model outputs or targets do not contain the desired values.