torch_floor_divide: Floor_divide

Description Usage Arguments floor_divide(input, other, out=NULL) -> Tensor Examples

View source: R/gen-namespace.R

Description

Floor_divide

Usage

1
torch_floor_divide(self, other)

Arguments

self

(Tensor) the numerator tensor

other

(Tensor or Scalar) the denominator

floor_divide(input, other, out=NULL) -> Tensor

Return the division of the inputs rounded down to the nearest integer. See torch_div for type promotion and broadcasting rules.

\mbox{{out}}_i = ≤ft\lfloor \frac{{\mbox{{input}}_i}}{{\mbox{{other}}_i}} \right\rfloor

Examples

1
2
3
4
5
6
7
if (torch_is_installed()) {

a = torch_tensor(c(4.0, 3.0))
b = torch_tensor(c(2.0, 2.0))
torch_floor_divide(a, b)
torch_floor_divide(a, 1.4)
}

torch documentation built on Oct. 7, 2021, 9:22 a.m.