@ptrblck: Yes. Because it is care about the order. I can use it to make grid but when I feed to grid_sample () function. The output looks rotated.
For example xx = torch.arange(0, W).view(1, 1,-1).repeat(D, H, 1) or xx = torch.arange(0, D).view(-1, 1,1).repeat(1, H, W)