Skip to content
fn

reciprocal_op

→TensorImplPtr
int reciprocal_op(const int & a)

Python wrappers

Public Python APIs implemented by this engine symbol.

Compute y=1/xy = 1 / x element-wise.

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

See Also

ReciprocalBackward — backward node.

Parameters

aTensorImplPtr
Input tensor of any shape. Behaviour is undefined at x=0x = 0.

Returns

TensorImplPtr

Output tensor of the same shape and dtype.