tanh method
Element-wise tanh.
Implementation
Tensor tanh() => map((x) {
final e2x = math.exp(2.0 * x);
return (e2x - 1.0) / (e2x + 1.0);
});
Element-wise tanh.
Tensor tanh() => map((x) {
final e2x = math.exp(2.0 * x);
return (e2x - 1.0) / (e2x + 1.0);
});