
Last chance! 50% off unlimited learning
Sale ends in
Creates a criterion that measures the loss given input tensors
Tensor
label
nn_cosine_embedding_loss(margin = 0, reduction = "mean")
(float, optional): Should be a number from margin
is missing, the
default value is
(string, optional): Specifies the reduction to apply to the output:
'none'
| 'mean'
| 'sum'
. 'none'
: no reduction will be applied,
'mean'
: the sum of the output will be divided by the number of
elements in the output, 'sum'
: the output will be summed.