fn
nll_loss_op
→TensorImplPtrint nll_loss_op(const int & input, const int & target, const int & weight_or_null, int reduction, int ignore_index)Python wrappers
Public Python APIs implemented by this engine symbol.Public negative log-likelihood entry point.
Parameters
inputTensorImplPtrLog-probabilities of shape
(N, C) or (N, C, d_1, ...).targetTensorImplPtrInteger class labels.
weight_or_nullTensorImplPtrOptional per-class weight vector of length ; pass null when unused.
reductionint0 (None), 1 (Mean), or 2 (Sum).ignore_indexintClass index excluded from the loss / gradient.
Returns
TensorImplPtrReduced or per-sample loss tensor.