nn_soft_margin_loss | R Documentation |
Creates a criterion that optimizes a two-class classification
logistic loss between input tensor x
and target tensor y
(containing 1 or -1).
nn_soft_margin_loss(reduction = "mean")
reduction |
(string, optional): Specifies the reduction to apply to the output:
|
\mbox{loss}(x, y) = \sum_i \frac{\log(1 + \exp(-y[i]*x[i]))}{\mbox{x.nelement}()}
Input: (*)
where *
means, any number of additional
dimensions
Target: (*)
, same shape as the input
Output: scalar. If reduction
is 'none'
, then same shape as the input
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.