Skip to main content

ClikaRT::nn::NLLLoss

class

Header: ClikaRT/nn/generated/loss.h
Inherits: ClikaRT::nn::Module

Negative log-likelihood over log-probabilities with the class axis last. The module form of ClikaRT::ops::nll_loss, which documents the full contract (shapes, dtypes, errors); construct once, then call it like a function.

Member functions​

NLLLoss()​

explicit NLLLoss(NLLLossOptions options = {})

Constructs the module from options (every default when omitted).

Declared in ClikaRT/nn/generated/loss.h, line 336

forward()​

Tensor forward(Tensor input, Tensor target) const

forward_impl, unwrapped: raises ClikaRT::Error on failure.

Declared in ClikaRT/nn/generated/loss.h, line 349

operator()()​

Tensor operator()(Tensor input, Tensor target) const

Same as forward.

Declared in ClikaRT/nn/generated/loss.h, line 353

options()​

const NLLLossOptions& options() const

The settings this module was constructed with.

Declared in ClikaRT/nn/generated/loss.h, line 357