tanh method

Tensor tanh()

Element-wise tanh.

Implementation

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