cvqluu / Angular-Penalty-Softmax-Losses-Pytorch

Angular penalty loss functions in Pytorch (ArcFace, SphereFace, Additive Margin, CosFace)
MIT License
481 stars 92 forks source link

questions about SphereFace #6

Open LeeBC2298 opened 4 years ago

LeeBC2298 commented 4 years ago

I think the implementation of SphereFace is wrong, because in the original paper of SphereFace:

  1. The hyperparameter 'm', which means the angular restrain, should be no less than 3 in multiclassifition task, but I could not get correct visualizing result when set m bigger than 2.
  2. cos(m*theta) was replaced by another function called 'pht(theta)'.
  3. the feature vector x wasn't normalized in SphereFace, so there is not hyperparameter 's' in SphereFace.