Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why use no_grad for computing d_theta #13

Open
tangzhongliang opened this issue Jan 12, 2023 · 1 comment
Open

Why use no_grad for computing d_theta #13

tangzhongliang opened this issue Jan 12, 2023 · 1 comment

Comments

@tangzhongliang
Copy link

hello, i found this code ignore grad for g_cos_theta and angular margin.
https://github.com/ydwen/opensphere/blob/main/model/head/sphereface2.py#L62-L80

Will this not cause network oscillation?

@tangzhongliang tangzhongliang changed the title Why use no_grad for compute d_theta Why use no_grad for computing d_theta Jan 12, 2023
@lizhenstat
Copy link

@tangzhongliang I think it is the Characteristic Gradient Detachment to stable training proposed in paper "SphereFace Revived:
Unifying Hyperspherical Face Recognition"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants