oa::ml::matrix::gelu

Apply the tanh-approximate Gaussian error linear unit elementwise. Errors Returns an error unless input is F32 or runtime recording fails.

FnRust public API

Function Documentation

pub fn gelu( input: &Matrix ) -> Result<Matrix>
Apply the tanh-approximate Gaussian error linear unit elementwise. Errors Returns an error unless input is F32 or runtime recording fails.