Skip to main content

token_nll

Function token_nll 

Source
pub fn token_nll(logits: &[f32], target: usize) -> f64
Expand description

Negative log-likelihood (nats) of target under softmax(logits) = logsumexp - logits[target].