Skip to content
fn

sign_inplace_op

→TensorImplPtr
int sign_inplace_op(const int & a)

In-place sign function: writes sign(x)∈{−1,0,+1}\mathrm{sign}(x) \in \{-1, 0, +1\} back into a.

Math

ai←sign(ai)a_i \leftarrow \mathrm{sign}(a_i)

See Also

sign_op — out-of-place counterpart.

Parameters

aTensorImplPtr
Tensor to apply sign to in place. Must be non-null.

Returns

TensorImplPtr

The same pointer as a.