pub fn softmax<T: Float + Sum<T> + Ln2>(
val: &[T],
) -> Result<impl Iterator<Item = LogProb<T>> + use<T>, FloatIsNanOrPositiveInfinity>Expand description
Returns an iterator with the softmax values of a slice of floats.
ยงErrors
Returns FloatIsNanOrPositiveInfinity if any float is NaN or positive infinity.