torch_ceil {torch}R Documentation

Ceil

Description

Ceil

Usage

torch_ceil(self)

Arguments

self

(Tensor) the input tensor.

ceil(input, out=NULL) -> Tensor

Returns a new tensor with the ceil of the elements of input, the smallest integer greater than or equal to each element.

\mbox{out}_{i} = \left\lceil \mbox{input}_{i} \right\rceil = \left\lfloor \mbox{input}_{i} \right\rfloor + 1

Examples

if (torch_is_installed()) {

a = torch_randn(c(4))
a
torch_ceil(a)
}

[Package torch version 0.13.0 Index]