Package-level declarations
Types
Link copied to clipboard
Binary Cross-Entropy Loss with Logits (numerically stable).
Link copied to clipboard
Binary Cross-Entropy Loss.
Link copied to clipboard
Categorical Cross-Entropy Loss.
Link copied to clipboard
Link copied to clipboard
Hinge Loss for SVM-style classification.
Link copied to clipboard
Huber Loss (Smooth L1 Loss).
Link copied to clipboard
Log-Cosh Loss.
Link copied to clipboard
Link copied to clipboard
class PoissonLoss @JvmOverloads constructor(logInput: Boolean = true, epsilon: Float = 1.0E-8f) : Loss
Poisson Negative Log Likelihood Loss.
Link copied to clipboard
Sparse Categorical Cross-Entropy Loss.
Link copied to clipboard
Squared Hinge Loss.
Functions
Link copied to clipboard
fun <T : DType, V> evaluateLoss(model: Module<T, V>, loss: Loss, inputs: Tensor<T, V>, targets: Tensor<out DType, *>, ctx: ExecutionContext, reduction: Reduction = Reduction.MEAN): Tensor<T, V>
Utility helpers to evaluate a loss given a model, inputs, and targets. Keeps loss evaluation explicit and separate from the network-building DSL.