Skip to content
fn

log2_op

→TensorImplPtr
int log2_op(const int & a)

Python wrappers

Public Python APIs implemented by this engine symbol.

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

See Also

Log2Backward — backward node.

Parameters

aTensorImplPtr
Input tensor of any shape. Must be strictly positive.

Returns

TensorImplPtr

Output tensor of the same shape and dtype.