Function dfdx::tensor_ops::tanh
source · [−]Expand description
The derivative is 1.0 - square(tanh(t))
.
Examples:
let t = Tensor1D::new([-1.0, 0.0, 1.0, 2.0]);
// use function version
let r = tanh(t.clone());
// or the tensor method!
let r2 = t.tanh();