I’m not calling anything after the train function.
If i try running the net it works fine, it does a good job at segmenting using the pretrained weights.
But the model obtained after finetuning is unusable (as shown by accuracy drop from 85% to 50%).
I noticed that if I let the training process run for many epochs (100+) I get a working model, basically trained from scratch. This does not solve my problem, but I guess is just another confirmation that the whole thing “is working”, but the parameters “get lost” moving from epoch 1 to epoch 2.