Hi!
I’ve found this strange behavior which I think is unexpected.
Running the following code, the last 2 printed outputs are different though I would expect the 2 operations to be equivalent:
import torch
x = torch.randn(3, 3, 1, 2)
print(x[:, 2, ...])
print(torch.tanh(x[...]))
print(torch.tanh(x[:, 2, ...]))
print(torch.tanh(x[:, 2, ...].contiguous()))

It seems that torch.tanh(x[:, 2, ...]) gives the wrong result.
Is this supposed to happen? If so, why?
Thanks in advance
PyTorch version: 0.4.1
Python version: 3.6