qubvel / segmentation_models

Segmentation models with pretrained backbones. Keras and TensorFlow Keras.
MIT License
4.77k stars 1.03k forks source link

Weights loading and evaluation #464

Open luna9722 opened 3 years ago

luna9722 commented 3 years ago

Hello everybody, I trained my model using weighted dice loss + categorical focal loss and saved the weights in the file weights.h5, now I have to load my weights in another notebook for prediction and post processing so i have to call the model and compile it with the same loss I used in taining, do I have to use the same class weights or use other class weights for testing ( in fact for training i calculated class weights with a sklearn function) please can someone answer my question so I can be assured I am doing the right thing ? image image

Thanks in advance.