PyTorch torch.floor function
PyTorch torch reference manual
torch.floor A function in PyTorch for element-wise floor (rounding down).
Function definition
torch.floor(input, out=None)
Usage examples
Example
import
torch
x
=
torch.
tensor
(
[
1.1
,
2.5
,
3.7
,
1.2
]
)
(
torch.
floor
(
x
)
)
The output is:
tensor([1., 2., 3., -2.])