You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, it seems like the numpy conversion ignores the storage offset:
In [9]: x = torch.randn(4)
In [10]: x
Out[10]:
-0.3685
-0.7098
0.5450
0.7965
[torch.FloatTensor of size 4]
In [11]: y = x[2:]
In [12]: x.storage_offset()
Out[12]: 0
In [13]: y.storage_offset()
Out[13]: 2
In [14]: x.numpy()
Out[14]: array([-0.36845183, -0.70976418, 0.54498219, 0.79646742], dtype=float32)
In [15]: y.numpy()
Out[15]: array([-0.36845183, -0.70976418], dtype=float32)