nll_loss¶
dragon.vm.torch.nn.functional.
nll_loss
(
input,
target,
weight=None,
size_average=None,
ignore_index=None,
reduce=None,
reduction='mean'
)[source]¶Compute the negative likelihood loss.
- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- target (dragon.vm.torch.Tensor) – The target tensor.
- weight (dragon.vm.torch.Tensor, optional) – The weight for each class.
- size_average (bool, optional) – Whether to average the loss.
- ignore_index (int, optional) – The ignored value of target.
- reduce (bool, optional) – Whether to reduce the loss.
- reduction ({'none', 'mean', 'sum', 'valid'}, optional) – The reduce method.
- Returns:
dragon.vm.torch.Tensor – The loss.
See also