oa::ml::matrix::leaky_relu

Apply Leaky ReLU elementwise with the requested negative slope. Errors Returns an error unless input is F32 or runtime recording fails.

FnRust public API

Function Documentation

pub fn leaky_relu( input: &Matrix, alpha: f32 ) -> Result<Matrix>
Apply Leaky ReLU elementwise with the requested negative slope. Errors Returns an error unless input is F32 or runtime recording fails.