Module loss

Module loss 

Source

Enums§

Reduction
Reduction mode for loss functions.

Functions§

bce_loss
Binary Cross-Entropy loss for probabilities in [0, 1].
bce_with_logits_loss
Binary Cross-Entropy with Logits (numerically stable).
cross_entropy_loss
Cross-entropy loss with log-softmax for numerical stability.
l1_loss
L1 Loss (Mean Absolute Error): mean(|prediction - target|)
l1_loss_with_reduction
L1 Loss with configurable reduction.
mse_loss
Mean Squared Error loss: mean((prediction - target)²)
mse_loss_with_reduction
MSE Loss with configurable reduction.
nll_loss
Negative Log-Likelihood Loss with integer class indices.
smooth_l1_loss
Smooth L1 Loss (Huber Loss):