Skip to main content

Module loss_function

Module loss_function 

Source
Expand description

TensorLossFunction — common loss functions for tensor computations.

Provides MSE, MAE, Cross-Entropy, Huber, and Hinge loss with configurable reduction modes (Mean, Sum, None) and per-element gradient computation.

Structs§

LossConfig
Configuration for a TensorLossFunction.
LossFunctionStats
Statistics snapshot for a TensorLossFunction.
TensorLossFunction
Common loss functions for tensor computations with gradient support.

Enums§

LossType
Type of loss function to compute.
Reduction
How to aggregate per-element losses into a scalar.