We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please change the minimum value of the square root to the epsilon calculator, as shown below.
↓ Before change (current)
arcface-pytorch/models/metrics.py
Line 38 in 47ace80
↓ After change
sine = torch.sqrt((1.0 - torch.pow(cosine, 2)).clamp(1e-6, 1))
The differential function of √x, 1/(2√x), becomes inf near x=0, i.e., an exploding gradient.
inf
This results in a loss of nan as reported in #81.
nan
So please fix it so that sqrt does not take 0.
sqrt
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Please change the minimum value of the square root to the epsilon calculator, as shown below.
↓ Before change (current)
arcface-pytorch/models/metrics.py
Line 38 in 47ace80
↓ After change
The differential function of √x, 1/(2√x), becomes
inf
near x=0, i.e., an exploding gradient.This results in a loss of
nan
as reported in #81.So please fix it so that
sqrt
does not take 0.The text was updated successfully, but these errors were encountered: