affinity-loss
affinity-loss copied to clipboard
Some questions about the calculation of rw in GaussianAffinity Loss
In your code, when regularization is computed, the rw is multiplied by a coefficient, that is:
https://github.com/koshian2/affinity-loss/blob/c678c3cd5c63767ff4217733bd978e0d9ef24ceb/affinity_loss.py#L46
But in the original paper, the coefficient is unnecessary, see Equations 7 and 8 for details. And the coefficient should only be multiplied in the calculation of mu, that is
https://github.com/koshian2/affinity-loss/blob/c678c3cd5c63767ff4217733bd978e0d9ef24ceb/affinity_loss.py#L44
May I ask why this coefficient is multiplied twice? Thanks!