deepinsight / deepinsight/insightface

[arcface_torch] loss become negative, when train the partical fc !

Open
#1,428 3 comments 0 reactions 0 assignees View on GitHub
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.
![image](https://user-images.githubusercontent.com/41863500/111112427-1e514600-859b-11eb-94ea-03d801efdd55.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.