MuggleWang / CosFace_pytorch

Pytorch implementation of CosFace
MIT License
242 stars 52 forks source link

About the title #15

Open LeeBC2298 opened 4 years ago

LeeBC2298 commented 4 years ago

I think this project is about 'SphereFace', not 'CosFace'. CosFace use LMCL loss function, not A-softmax loss.

fuenwang commented 2 years ago

@LeeBC2298 I think it's indeed cosface. The output of the classifier (https://github.com/MuggleWang/CosFace_pytorch/blob/master/layer.py#L43) is the cosine similarity with margin. And directly optimizing the cosine similarity with cross entropy loss is equal to LMCL (Eq. 4 in the paper).