Rate this Page

Typedef torch::nn::functional::NLLLossFuncOptions#

Typedef Documentation#

using torch::nn::functional::NLLLossFuncOptions = NLLLossOptions#

Options for torch::nn::functional::nll_loss.

See the documentation for torch::nn::NLLLossOptions class to learn what arguments are supported.

Example:

namespace F = torch::nn::functional;
F::nll_loss(input, target,
F::NLLLossFuncOptions().ignore_index(-100).reduction(torch::kMean));