arcface-pytorch
arcface-pytorch copied to clipboard
The loss function seems to be error
The focal loss function seems to be differernt from the theory. The theory describes the loss as: -alpha * (1-y')^gamma * log(y') - (1-alpha) * y'^gamma * log(1-y') Besides, the arc metric also confuses me...ArcFace is modified based on softmax but there is nothing similiar to softmax in the metric code. Maybe I misunderstand the theory. I will be grateful if you point my errors out.
About the seconde question, I have found the answer. Torch.nn.CrossEntropyLoss() combines nn.LogSoftmax() and nn.NLLLoss() in one single class.
About the seconde question, I have found the answer. Torch.nn.CrossEntropyLoss() combines nn.LogSoftmax() and nn.NLLLoss() in one single class.
have you try sphereloss in metric.py?i can`t make loss decrease
About the seconde question, I have found the answer. Torch.nn.CrossEntropyLoss() combines nn.LogSoftmax() and nn.NLLLoss() in one single class.
have you try sphereloss in metric.py?i can`t make loss decrease
my training loss is not decline too, how do you resolve this problem???
I think the focal loss here is wrong.
About the seconde question, I have found the answer. Torch.nn.CrossEntropyLoss() combines nn.LogSoftmax() and nn.NLLLoss() in one single class.
So is the implementation here of ArcFace loss right?