def __init__(self, input_tensor, dilation_factor):
        assert (layer_util.check_spatial_dims(
            input_tensor, lambda x: x % dilation_factor == 0))
        self._tensor = input_tensor
        self.dilation_factor = dilation_factor
        # parameters to transform input tensor
        self.spatial_rank = layer_util.infer_spatial_rank(self._tensor)
        self.zero_paddings = [[0, 0]] * self.spatial_rank
        self.block_shape = [dilation_factor] * self.spatial_rank