Function activation_functions::f32::relu[][src]

pub fn relu(x: f32) -> f32
Expand description

calculate the rectified linear unit to the given f32 number

Examples

let x:f32 = 0.5;
let answer:f32 = relu(x);
 
println!("relu({}) => {}",x,answer);