Skip to content
fn

tanh_op

→TensorImplPtr
int tanh_op(const int & a)

Python wrappers

Public Python APIs implemented by this engine symbols.

Compute y=tanh⁡(x)y = \tanh(x) element-wise. Allocates a fresh output of the same shape and dtype as a and delegates to TanhBackward::forward.

See Also

TanhBackward — backward node.

Parameters

aTensorImplPtr
Input tensor of any shape.

Returns

TensorImplPtr

Output tensor of the same shape and dtype, values in (−1,1)(-1, 1).