MuggleWang / CosFace_pytorch

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

Question about the implementation of AngleLinear #8

Closed wujiyang closed 5 years ago

wujiyang commented 5 years ago

In the forward function, why mulitiply the norm of feature after output ? output = (one_hot * (phi_theta - cos_theta) / (1 + self.lamb)) + cos_theta output *= NormOfFeature.view(-1, 1)

MuggleWang commented 5 years ago

In sphereface, author doesn't normalize the feature

wujiyang commented 5 years ago

In sphereface, author doesn't normalize the feature

Thank you very much, I got it.