Dear amlarraz:
There's a little mistake in test.py. Forgetting to load pretrained model before testing.
By the way, what's the meaning of class_weights in function CombinedLoss? It seems like a lot influence in computing the loss of model. I got a better result when I tried to delete the class_weights before training the model.