You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that there is something wrong about your function "LossCosine", located at /Layers/TAL_pytorch.py. When I train with cosine regularization, the loss is less than zero, which is totally impossible. And I notice that in function "LossCosine", before returning the mean value of loss, you multiply it with minus one, which is different from that in function "LossDis" function.
And in your paper, the math formulation of your Cosine regularization is also multiplied by minus one, which makes the loss value is less than zero. Is there something wrong with me?
The text was updated successfully, but these errors were encountered:
Cosine similarity ranges from -1 to 1, and the larger value means that the two vectors have closer directions. So multiplying it by -1 means that we want to maximizing the cosine similarity.
It seems that there is something wrong about your function "LossCosine", located at /Layers/TAL_pytorch.py. When I train with cosine regularization, the loss is less than zero, which is totally impossible. And I notice that in function "LossCosine", before returning the mean value of loss, you multiply it with minus one, which is different from that in function "LossDis" function.
And in your paper, the math formulation of your Cosine regularization is also multiplied by minus one, which makes the loss value is less than zero. Is there something wrong with me?
The text was updated successfully, but these errors were encountered: