torch.floor_divide¶
-
torch.
floor_divide
(input, other, out=None) → Tensor¶ Return the division of the inputs rounded down to the nearest integer. See
torch.div()
for type promotion and broadcasting rules.- Parameters
- Keyword Arguments
out (Tensor, optional) – the output tensor.
Example:
>>> a = torch.tensor([4.0, 3.0]) >>> b = torch.tensor([2.0, 2.0]) >>> torch.floor_divide(a, b) tensor([2.0, 1.0]) >>> torch.floor_divide(a, 1.4) tensor([2.0, 2.0])