DistributionBalancedLoss icon indicating copy to clipboard operation
DistributionBalancedLoss copied to clipboard

About code implementation of eq7

Open saishkomalla opened this issue 3 years ago • 0 comments

Hey thanks for the code 😄 but have some questions!!

https://github.com/wutong16/DistributionBalancedLoss/blob/14460d0acda6a3e77a8a6a5999b9746243cb1535/mllt/models/losses/resample_loss.py#L158-L160

Isn't this inconsistent with eq7
Screenshot 2022-10-28 at 2 25 03 AM

  1. Like line 159 is dealing with the exp power in eq7 right? (Line 159) why are we directly multiplying it with labels, that anyhow occurs when we pass it to self.cls_criterion right? (same goes for weight)

  2. Bit confused in name https://github.com/wutong16/DistributionBalancedLoss/blob/14460d0acda6a3e77a8a6a5999b9746243cb1535/mllt/models/losses/resample_loss.py#L113 Is cls_score here (logits passed through sigmoid/softmax) or just pure raw classifier outputs?, because even though we call it cls_score it's passed the to the same F.binary_cross_entropy_with_logits_loss

saishkomalla avatar Oct 27 '22 21:10 saishkomalla