torch_floor: Floor

View source: R/gen-namespace.R

torch_floorR Documentation

Floor

Description

Floor

Usage

torch_floor(self)

Arguments

self

(Tensor) the input tensor.

floor(input, out=NULL) -> Tensor

Returns a new tensor with the floor of the elements of input, the largest integer less than or equal to each element.

\mbox{out}_{i} = \left\lfloor \mbox{input}_{i} \right\rfloor

Examples

if (torch_is_installed()) {

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

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