TensorPlay
API symbolsnn
Copy
View MarkdownDownload .md

tensorplay.nn.functional.nll_loss

tensorplay.nn.functional.nll_loss(input, target, weight=None, size_average=None, ignore_index=-100, reduce=None, reduction='mean')[source]

The negative log likelihood loss.

Supports the same shapes as torch.nn.functional.nll_loss(): 1D input with a scalar target, 2D (N, C), and N-d (N, C, d_1, ..., d_k) (torch’s nll_loss_nd) with matching target.

See NLLLoss for details.

Ask DeepWiki