qubvel / segmentation_models

Segmentation models with pretrained backbones. Keras and TensorFlow Keras.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorporating sample weights in loss function

marlens123 opened this issue · comments

hey, thanks for providing this great repository!
I am working on using the sm.Unet model for semi-supervised segmentation with categorical focal dice loss function. My current goal is to implement sample weights in the loss function to scale the loss depending on the quality of the sample, as is possible in tf loss functions (e.g. https://www.tensorflow.org/api_docs/python/tf/keras/losses/CategoricalCrossentropy). I was wondering if anyone here has worked on this before, and would be happy to exchange ideas!