|
margins = torch.zeros_like(similarities) |
|
margins[torch.arange(margins.shape[0]), targets] = margin |
|
similarities = scale * (similarities - margin) |
Based on the equation in the paper, shouldn't line 74 be similarities - margins instead? Currently it seems to remove the margin for all classes instead of the only the target class?
incremental_learning.pytorch/inclearn/lib/losses/base.py
Lines 72 to 74 in 0d25c2e
Based on the equation in the paper, shouldn't line 74 be
similarities - marginsinstead? Currently it seems to remove the margin for all classes instead of the only the target class?