pub fn tanh_derivative(x: f32) -> f32
Calculates the derivative of the hyperbolic tangent activation function for a given input.
x
let x = 0.5; let result = cgl_rs::math::activations::tanh_derivative(x); println!("tanh_derivative({}) = {}", x, result);