pub fn cross_entropy_with_smoothing(
logits: &Vector<f32>,
target_idx: usize,
epsilon: f32,
) -> f32Expand description
Cross-entropy loss with label smoothing.
ONE PATH: Uses nn::functional::log_softmax_1d for numerical stability (UCBD §4).