Learn R Programming

torch (version 0.0.2)

torch_floor: Floor

Description

Floor

Arguments

input

(Tensor) the input tensor.

out

(Tensor, optional) the output tensor.

floor(input, out=None) -> 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

Run this code
# NOT RUN {
if (torch_is_installed()) {

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

Run the code above in your browser using DataLab