deepinsight / insightface

State-of-the-art 2D and 3D Face Analysis Project
https://insightface.ai
23.47k stars 5.42k forks source link

Need of forward_backward in partial_fc.py for arcface_torch ? #1489

Open bokey007 opened 3 years ago

bokey007 commented 3 years ago

Why do we explicitly need to code the backward part in forward_backward in partial_fc.py for arcface_torch?

can't PyTorch auto-differentiation take care of this?

I would really appreciate help on this.

Thanks

Light-- commented 3 years ago

same question here. how to simplfy the code to avoid manually compute the arcface gradient (grad and x_grad) in partial_fc.py ?@anxiangsir

ghost commented 2 years ago

did anyone find an answer or another solution for backward?