Hi there,
on a Tegra device, the sigmoid function in PyTorch produces different results, depending on the position in a tensor:
import torch
print(torch.__version__)
t = torch.Tensor([7.0 for i in range(36)])
s = torch.sigmoid(t)
print(t)
print(s)
results in:
1.8.0
tensor([7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7.,
7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7., 7.])
tensor([0.9991, 0.9991, 0.9991, 0.9991, 0.9991, 0.9991, 0.9991, 0.9991, 0.9991,
0.4998, 0.4998, 0.4998, 0.4998, 0.4998, 0.4998, 0.4998, 0.9991, 0.9991,
0.9991, 0.9991, 0.9991, 0.9991, 0.9991, 0.9991, 0.9991, 0.4998, 0.4998,
0.4998, 0.4998, 0.4998, 0.4998, 0.4998, 0.9991, 0.9991, 0.9991, 0.9991])
The error occurs on Jetson Xavier AGX and on Jetson Nano, both running JetPack 4.6. PyTorch 1.8.0 was installed using pip3.
On a x86_64 machine, everything is as expected (i.e. 0.9991 always).
Thanks for any help