You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wish to define a custom binary crossentropy loss, in which I plan to apply the binary crossentropy loss on the foreground (1), and on the background(0), and then train the model using a combination of these two losses -> 0.8 emphasis on the foreground, and 0.2 on the background.
I attempted the following: (taking some inspiration from this code in the train.py file.
My idea was to first separate the background and foreground in the predicted and ground-truth images, compute the losses and merge them in a weighted manner in the end. However, this approach leads to an typeError: Expected float32, got <tensorflow.pytho.keras.losses.BinaryCrossentropy object at 0x14ace4041040> of type 'BinaryCrossentropy' instead. traceback.
(The pr and gt in the code seems to be probability values, and not logits, since an activation is already applied)
Kindly help me out with the following,
Thanks.
The text was updated successfully, but these errors were encountered:
I wish to define a custom binary crossentropy loss, in which I plan to apply the binary crossentropy loss on the foreground (1), and on the background(0), and then train the model using a combination of these two losses -> 0.8 emphasis on the foreground, and 0.2 on the background.
I attempted the following: (taking some inspiration from this code in the train.py file.
My idea was to first separate the background and foreground in the predicted and ground-truth images, compute the losses and merge them in a weighted manner in the end. However, this approach leads to an
typeError: Expected float32, got <tensorflow.pytho.keras.losses.BinaryCrossentropy object at 0x14ace4041040> of type 'BinaryCrossentropy' instead.
traceback.(The
pr
andgt
in the code seems to be probability values, and not logits, since an activation is already applied)Kindly help me out with the following,
Thanks.
The text was updated successfully, but these errors were encountered: