Function tanh

  • Compute the hyperbolic tangent function each element in a tensor. There is a method version of this static function: Tensor.tanh.

    $$\tanh(x) : \forall x \in T$$

    Example

      const t = sm.randn([128, 128])

    // equivalent calls
    const a = t.tanh()
    const b = sm.tanh(t)

    Returns

    Parameters

    • tensor: Tensor

      Tensor whose values will have their hyperbolic tangent calculated

    Returns Tensor

Generated using TypeDoc