Skip to content

Margin in NCA loss #59

Open
Open
@EvelynChee

Description

@EvelynChee

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions