Table Of Contents
Table Of Contents

mxnet.ndarray.sparse.tanh

mxnet.ndarray.sparse.tanh(data=None, out=None, name=None, **kwargs)

Returns the hyperbolic tangent of the input array, computed element-wise.

\[tanh(x) = sinh(x) / cosh(x)\]

The storage type of tanh output depends upon the input storage type:

  • tanh(default) = default

  • tanh(row_sparse) = row_sparse

  • tanh(csr) = csr

Defined in src/operator/tensor/elemwise_unary_op_trig.cc:L234

Parameters
  • data (NDArray) – The input array.

  • out (NDArray, optional) – The output NDArray to hold the result.

Returns

out – The output of this function.

Return type

NDArray or list of NDArrays