Solved by ptrblck in post #2 
              
              
                This should alternatively work: 
out = torch.zeros(indices[:, 0].max()+1, indices[:, 1].max()+1, x[0].size(0)).long()
out[indices[:, 0], indices[:, 1]] = x
print(out)
> tensor([[[ 7,  8,  9],
           [ 1,  2,  3]],

          [[ 4,  5,  6],
           [10, 11, 12]]])