pub fn softmax_bwd(y: &Tensor, dy: &Tensor) -> Result<Tensor>Available on crate feature
train only.Expand description
Softmax backward from the forward output y: dx = y * (dy - sum(y*dy)) per row. Causal masking needs no parameters here — masked forward outputs are exact zeros.