I have read the paper about circle loss for neural networks. I may have missed something, but I didn't find the way to compute the positive similarity and the negative similarity in the case of circle loss.

The paper gives the equations for AM-SoftMax and Triplet loss, that can be computed from a unified loss function:

Loss Function

For example, in the case of AM-SoftMax, the positive and negative similarities are computed by the following way, w being the weights of the last fully connected layer, and x being the inputs of this last layer:

positive similarity

negative similarity

So my questions are:

  1. Should I compute the similarities for circle loss by the same way the paper compute them for AM-SoftMax ?

  2. Should I compute the forward pass of the last fully connected layer with a standard product: output[j] += weight[i][j] * input[i], followed by a standard SoftMax function ? Or by another way ?

  • $\begingroup$ Hello. Welcome to AISE. In general, each post should contain exactly one question. As a rule of thumb, if you can't put your specific question in the title (because maybe you have more than 1), then your post might be too broad. Moreover, note that programming questions are off-topic. However, if you're only trying to understand how the theory is connected to the code, then your questions are fine for our site. $\endgroup$
    – nbro
    Mar 5, 2022 at 23:50
  • $\begingroup$ I have reformulated my question, focalizing on the two problems I have with circle loss computation. $\endgroup$ Mar 6, 2022 at 3:43


You must log in to answer this question.

Browse other questions tagged .