I found this wired inconsistencies in pytorch:
a = torch.ones(1)
b = a+0.1
b[0] # b[0] here is 1.100000023841858
b.numpy()[0] # 1.1
c = 10000
d = c+0.1
d[0] # d[0] is 1000.0999755859375
d.numpy()[0] # 1000.1
This error between x[0] and it should be gets larger and larger as x goes up. And this seems to make the gradient check function get_numerical_jacobian()
especially unstable when dealing with large inputs
Can anyone explain why is this the case?