Skip to content
fn

ceil_op

→TensorImplPtr
int ceil_op(const int & a)

Python wrappers

Public Python APIs implemented by this engine symbol.

Element-wise ceiling — returns the smallest integer-valued tensor not less than a, with the same dtype as a.

Differentiable with a zero gradient, as the reference keeps it.

Math

yi=⌈xi⌉y_i = \lceil x_i \rceil

Shape

Output shape equals input shape (elementwise).

See Also

floor_op, round_op.

Parameters

aTensorImplPtr
Input tensor. Integer dtypes are returned unchanged.

Returns

TensorImplPtr

New tensor with ceiled values; same shape, dtype, and device as a.