torch_ceil function

Ceil

Ceil

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.

\mboxouti=\mboxinputi=\mboxinputi+1 \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) }
  • Maintainer: Daniel Falbel
  • License: MIT + file LICENSE
  • Last published: 2025-02-14