mednet.models.classify.loss_weights¶
Helpers for computing (sample/label) weights for loss terms.
Functions
|
Return a balanced binary-cross-entropy loss. |
- mednet.models.classify.loss_weights.make_balanced_bcewithlogitsloss(dataloader)[source]¶
Return a balanced binary-cross-entropy loss.
The loss is weighted using the ratio between positives and total examples available.