Skip to content
fn

abs_op

→TensorImplPtr
int abs_op(const int & a)

Python wrappers

Public Python APIs implemented by this engine symbol.

Compute y=∣x∣y = |x| element-wise.

Allocates a fresh output of the same shape and dtype as a and delegates to AbsBackward::forward.

See Also

AbsBackward — backward node.

Parameters

aTensorImplPtr
Input tensor of any shape.

Returns

TensorImplPtr

Output tensor of the same shape and dtype, with non-negative values.