Solved by albanD in post #3 
              
              
                The correct way to get a torch tensor from numpy array is using torch.from_numpy(). 
Trying to build a tensor directly can have unexpected effect in some cases.