def METHOD_NAME(self, size, stride, offset):
    grid_height, grid_width = size[0], size[1]
    shifts_x = paddle.arange(
        offset * stride, grid_width * stride, step=stride, dtype='float32')
    shifts_y = paddle.arange(
        offset * stride,
        grid_height * stride,
        step=stride,
        dtype='float32')
    shift_y, shift_x = paddle.meshgrid(shifts_y, shifts_x)
    shift_x = paddle.reshape(shift_x, [-1])
    shift_y = paddle.reshape(shift_y, [-1])
    return shift_x, shift_y