def initialize_flow(self, img):
    ' Flow is represented as difference between two coordinate grids flow = coords1 - coords0'
    (N, C, H, W) = img.shape
    coords0 = coords_grid(N, (H // 8), (W // 8)).to(img.device)
    coords1 = coords_grid(N, (H // 8), (W // 8)).to(img.device)
    return (coords0, coords1)
Flow is represented as difference between two coordinate grids flow = coords1 - coords0
def initialize_flow(self, img):
    ' '
    (N, C, H, W) = img.shape
    coords0 = coords_grid(N, (H // 8), (W // 8)).to(img.device)
    coords1 = coords_grid(N, (H // 8), (W // 8)).to(img.device)
    return (coords0, coords1)