torch.nn.functional.nll_loss
torch.nn.functional.nll_loss(input, target, weight=None, size_average=None, ignore_index=- 100, reduce=None, reduction='mean')
The negative log likelihood loss.
See "NLLLoss" for details.
Parameters:
      * input (Tensor) -- (N, C) where C = number of classes
        or (N, C, H, W) in case of 2D Loss, or (N, C, d_1, d_2, ...,
        d_K) where K \geq 1 in the case of K-dimensional loss. input
        is expected to be log-probabilities.
  * **target** (*Tensor*) -- (N) where each value is 0 \leq
    \text{targets}[i] \leq C-1, or (N, d_1, d_2, ..., d_K) where K
    \geq 1 for K-dimensional loss.

  * **weight** (*Tensor**, **optional*) -- a manual rescaling
    weight given to each class. If given, has to be a Tensor of
    size *C*

  * **size_average** (*bool**, **optional*) -- Deprecated (see
    "reduction"). By default, the losses are averaged over each
