import numpy as np
from numpy import *
import torch
grid_x=torch.arange(2,dtype=torch.float)
print(grid_x)
grid_x=grid_x.repeat(1,3,2,1)
print(grid_x)
W=2
H=2
grid_x = torch.arange(W, dtype=torch.float).repeat(1, 3, W, 1)
print(grid_x)
grid_y = torch.arange(H, dtype=torch.float).repeat(1, 3, H, 1).permute(0, 1, 3, 2)
print(grid_y)