Class-balanced-loss-pytorch icon indicating copy to clipboard operation
Class-balanced-loss-pytorch copied to clipboard

Pytorch implementation of the paper "Class-Balanced Loss Based on Effective Number of Samples"

Results 17 Class-balanced-loss-pytorch issues
Sort by recently updated
recently updated
newest added

Hi, i'm interested in your work! Now i have problem, why your implement code of focal loss use "modulator = torch.exp(-gamma * labels * logits - gamma * torch.log(1 +...

Hi, Inside the CBloss you are using binary cross-entropy, so why not using cross-entropy ? Could you explain? Thank you

original: cb_loss = F.binary_cross_entropy_with_logits(input = logits,target = labels_one_hot, weights = weights) update: cb_loss = F.binary_cross_entropy_with_logits(input = logits,target = labels_one_hot, weight = weights) - pytorch optimizer takes keyword 'weight', not 'weights'...

'weight' keyword for sigmoid loss spelled as 'weights'

The typo of weight parameter causes an error. It should be "weight" and not "weights".

Hi, I made the following modifications to make this loss function available on both CPU and GPU devices: 1. Check the device of `labels ` and `logits`; 2. Define the...