Solved by ptrblck in post #2 
              
              
                Your code seems to be working fine, if you get rid of the type mismatch error by calling float() on mat  
mat = torch.arange(0,16).reshape(4,2,2).float()
empty = torch.zeros((4,2,2))
ind = torch.tensor([0,2])
empty[ind] = mat[ind]
print(empty)
> tensor([[[ 0.,  1.],
           [ 2.,  3.]],

        …