zhen8838 / Circle-Loss

Tensorflow2 implementation of CircleLoss. Support class-level, sparse class-level, pair-wise labels
MIT License
108 stars 40 forks source link

Circle Loss的实现可能有错误 #5

Closed parap1uie-s closed 4 years ago

parap1uie-s commented 4 years ago

以二分类问题为例,在分类问题中,一个batch里可能有多个正样本,多个负样本。

即不能直接假设K = 1, L = N - 1

因此不能直接把正样本的概率和作为分子,所有概率和作为分母(调用softmax_cross_entropy()实际做的事情)

image

详见

如何理解与看待在cvpr2020中提出的circle loss? - 王峰的回答 - 知乎 https://www.zhihu.com/question/382802283/answer/1114719159

如何理解与看待在cvpr2020中提出的circle loss? - Yifan Sun的回答 - 知乎 https://www.zhihu.com/question/382802283/answer/1116269890