def __init__(self, dimension, resolution, **kwargs):
    """Init.

    Args:
      dimension: int, 0 to shift down, 1 to shift right.
      resolution: list of 2 ints, [H, W].
      **kwargs:
    """
    super(Shift, self).__init__(**kwargs)
    self.dimension = dimension
    self.resolution = resolution