understand how meshgrid and stack work. ft.pytorch
import torch x = torch.linspace(-1,1,3) y = torch.linspace(-1,1,3) z = torch.linspace(-1,1,3) xyz = torch.meshgrid(x, y, z) print(xyz[0]) xyz = torch.stack(xyz, dim=0) print(xyz.shape) out = xyz.repeat(1,1,1,1) print(out.shape) # xy = torch.meshgrid(x, y) # print(xy[0]) # xy = torch.stack(xy, dim=0) # print(xy) ''' tensor([[[-1., -1., -1.], [-1., -1., -1.], [-1., -1., -1.]], [[ 0., 0., 0.], [ 0...