torch_ceil: Ceil

View source: R/gen-namespace.R

torch_ceilR 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)
}

torch documentation built on May 29, 2024, 9:54 a.m.