github.com
  
  
    pytorch/pytorch/blob/677030b1cb12a2ff32fe85a3c2b9cc547ef47de8/torch/nn/functional.py#L1364 137

size_average: if ``True`` the output is divided by the number of elements
    in input tensor. Default: ``True``
reduce (bool, optional): By default, the losses are averaged
    over observations for each minibatch, or summed, depending on
    size_average. When reduce is False, returns a loss per input/target
    element instead and ignores size_average. Default: ``True``


""")




def cross_entropy(input, target, weight=None, size_average=True, ignore_index=-100, reduce=True):
r"""This criterion combines `log_softmax` and `nll_loss` in a single
function.


See :class:`~torch.nn.CrossEntropyLoss` for details.


Args:
    input: Variable :math:`(N, C)` where `C = number of classes`
    target: Variable :math:`(N)` where each value is
        `0 <= targets[i] <= C-1`
    weight (Tensor, optional): a manual rescaling weight given to each