deepinsight / deepinsight/insightface
[arcface_torch] loss become negative, when train the partical fc !
Open
arcface_torch
- Dominant language
- Python
- Stars
- 29.7k
- Forks
- 6.1k
- PR merge metrics
- No merged PRs in 30d
Description
In the first stage of backward,
https://github.com/deepinsight/insightface/blob/48a9e0bb5268137ba8ba3391c94a7d4425ed75aa/recognition/arcface_torch/partial_fc.py#L153
To monitor changes of training loss, I use
`y = grad * logits`
`loss1 = y.sum()`
`loss1.backward()`
to replace it.
No matter the nember of training data, after dozens of epochs, loss always becomes negative.

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.