tensor 向下取整
torch.floor(input, out=None)
>>> a = torch.randn(4)
>>> a
tensor([-0.8166, 1.5308, -0.2530, -0.2091])
>>> torch.floor(a)
tensor([-1., 1., -1., -1.])
https://www.jianshu.com/p/cf7adeff2a05tensor 的具体用法
tensor 向下取整
torch.floor(input, out=None)
>>> a = torch.randn(4)
>>> a
tensor([-0.8166, 1.5308, -0.2530, -0.2091])
>>> torch.floor(a)
tensor([-1., 1., -1., -1.])
https://www.jianshu.com/p/cf7adeff2a05tensor 的具体用法