🐛 Bug
Originally reported by @vfdev-5 in pytorch/vision#2342 (comment)
The behavior of round is not the same between torchscript and Python.
import torch
def foo():
return round(2.5)
sfoo = torch.jit.script(foo)
print(foo(), sfoo())
# gives
# 2, 3.0
There are two differences: the value is different, but the returned type as well (float instead of int).
I'm using PyTorch version '1.6.0.dev20200617'
cc @suo @gmagogsfm