question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Purpose of doing (-99999999.) * (1 - is_pos) in circle loss

See original GitHub issue

Hi,while I am reading the code of circle loss ,everything makes sense to me until this line ,the link I show below : https://github.com/JDAI-CV/fast-reid/blob/ced654431be28492066f4746d23c1ff89d26acbd/fastreid/modeling/losses/circle_loss.py#L38 I wonder why we need to add (-99999999.) * (1 - is_pos) after - gamma * alpha_p * (s_p - delta_p) .Thanks!!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
L1aoXingyucommented, Oct 26, 2021

image

以正样本为例,公式里面求 sum(exp) 那个部分表示只对正样本求和,如果 logits_p 不加后面的 -99999 那一项,得到的 logits_p 是一个矩阵,其中正样本的值是正确的,但是负样本的值是 0,exp(0) = 1,求和会多增加一些内容,和公式的结果会不一致

0reactions
twotwoiscutecommented, Oct 28, 2021

image

以正样本为例,公式里面求 sum(exp) 那个部分表示只对正样本求和,如果 logits_p 不加后面的 -99999 那一项,得到的 logits_p 是一个矩阵,其中正样本的值是正确的,但是负样本的值是 0,exp(0) = 1,求和会多增加一些内容,和公式的结果会不一致

明白了謝謝!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Circle Loss: A Unified Perspective of Pair Similarity Optimization
This paper provides a pair similarity optimization view- point on deep feature learning, aiming to maximize the within-class similarity sp and minimize the ......
Read more >
Circle Loss: A Unified Perspective of Pair Similarity Optimization
This paper provides a pair similarity optimization viewpoint on deep feature learning, aiming to maximize the within-class similarity s_p and ...
Read more >
Siamese Net, Triplet Loss, and Circle Loss Explained. - Medium
In short, Circle loss give a more flexible optimization by having different penalty strength for each similarity score, hence enabling them to ...
Read more >
TOPLINE & METHODOLOGY - Ipsos
Washington, DC, May 20, 2022 – Ipsos polling finds that many Americans feel good about their life and mood, though fewer feel positively ......
Read more >
XSO - River Thames Conditions
Tierser tal dolomiten, Rem karaoke losing my religion, Adelaide tv guide channel ... Bison 6 in 1 basketball goal, Bolgia inferno, Car air...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found