Skip to main content

//clika-runtime/io.clika.runtime/Ops/nllLoss

nllLoss

[common]
fun nllLoss(input: Tensor, target: Tensor, weight: Tensor? = null, ignoreIndex: Long? = null, reduction: Reduction = Reduction.MEAN): Tensor

nllLoss(input: Tensor, target: Tensor, weight: Tensor? = null, ignoreIndex: Long? = null, reduction: Reduction = Reduction.MEAN): the nll_loss operator. Negative-log-likelihood loss over LOG-probabilities; class dim LAST. input is expected to already be log-probabilities (pair with log_softmax; cross_entropy is the fused form).