PyTorch torch.floor Function
PyTorch torch Reference Manual
torch.flooris a function in PyTorch used for element-wise flooring.
Function Definition
torch.floor(input, out=None)
Usage Example
Example
import torch
x = torch.tensor([1.1, 2.5, 3.7, -1.2])
print(torch.floor(x))
x = torch.tensor([1.1, 2.5, 3.7, -1.2])
print(torch.floor(x))
The output result is:
tensor([1., 2., 3., -2.])
Other Extensions