How does cosinembeddingloss work?

Here and the reference it gives shows the parameters to be passed to cosinembeddingloss, but it didnt give a clear definition of target.
So what value am I supposed to assign to target and what purpose does it serve?

maybe 1 or -1; if inputs are similar, then 1, if inputs are not similar then -1.