Skip to content
fn

cos_op

→TensorImplPtr
int cos_op(const int & a)

Python wrappers

Public Python APIs implemented by this engine symbol.

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

See Also

CosBackward — backward node.

Parameters

aTensorImplPtr
Input tensor of any shape, values in radians.

Returns

TensorImplPtr

Output tensor of the same shape and dtype, values in [−1,1][-1, 1].