The transformations are already applied both on images and ground truths where needed.
The dataset consist of some objects and their binary segmentation map.
I could provide you the code I’m using for dataset creation / transforms / net implementation if this could help.
Anyway everything seems to work fine during the first epoch, accuracy is high and loss low, since the pretrained weights are good. The problem is the passage from the first epoch to the second, my guess is some parameter are not handled correctly.
How can I check the norm of the gradients you were talking about?