Closed SystemErrorWang closed 3 years ago
I changed the id loss to the cosine format, and this improved the model performance in my experiments.
Hi, the cosine similarity of two unit vectors is equal to the inner product. In my code, I used bmm to implement the inner product. I recommend you to read paper and code about Arcface, which faceshifter used for identity encoder.
At first, thank you for your nice work, it helped me a lot! But when I was reading your code, I found a problem: in the original paper, id loss is calculated by the cos similarity, while in this implementation, it's calculated by bmm or inner product. Would like to know the reason why change cosine loss to bmm, and the influence on the final result. much appreciate it if you would reply.