Why are these two ways of indexing a tensor not yielding the same results?
>>> torch.ones(3,3,3)[ [[0],[1],[2]] ]
tensor([1.])
>>> torch.ones(3,3,3)[ torch.tensor([[0],[1],[2]],dtype=torch.long) ]
tensor([[[[1., 1., 1.],
[1., 1., 1.],
[1., 1., 1.]]],
[[[1., 1., 1.],
[1., 1., 1.],
[1., 1., 1.]]],
[[[1., 1., 1.],
[1., 1., 1.],
[1., 1., 1.]]]])