def __init__(
        self,
        ablation_size: int,
        channels_first: bool,
        mode: str,
        to_reshape: bool,
        ablation_mode: str = "column",
        original_shape: tuple | None = None,
        output_shape: tuple | None = None,
        algorithm: str = "salman2021",
        device_type: str = "gpu",
    ):
        """
        Creates a column ablator

        :param ablation_size: The size of the column we will retain.
        :param channels_first: If the input is in channels first format. Currently, required to be True.
        :param mode: If we are running the algorithm using a CNN or VIT.
        :param to_reshape: If the input requires reshaping.
        :param ablation_mode: The type of ablation to perform.
        :param original_shape: Original shape of the input.
        :param output_shape: Input shape expected by the ViT. Usually means upscaling the input to 224 x 224.
        :param algorithm: Either 'salman2021' or 'levine2020'.
        :param device_type: Type of device on which the classifier is run, either `gpu` or `cpu`.
        """
        super().__init__()

        self.ablation_size = ablation_size
        self.channels_first = channels_first
        self.to_reshape = to_reshape
        self.add_ablation_mask = False
        self.additional_channels = False
        self.algorithm = algorithm
        self.original_shape = original_shape
        self.ablation_mode = ablation_mode

        if self.algorithm == "levine2020":
            self.additional_channels = True
        if self.algorithm == "salman2021" and mode == "ViT":
            self.add_ablation_mask = True

        if device_type == "cpu" or not torch.cuda.is_available():
            self.device = torch.device("cpu")
        else:  # pragma: no cover
            cuda_idx = torch.cuda.current_device()
            self.device = torch.device(f"cuda:{cuda_idx}")

        if original_shape is not None and output_shape is not None:
            self.upsample = UpSamplerPyTorch(input_size=original_shape[1], final_size=output_shape[1])

        Creates a column ablator

        :param ablation_size: The size of the column we will retain.
        :param channels_first: If the input is in channels first format. Currently, required to be True.
        :param mode: If we are running the algorithm using a CNN or VIT.
        :param to_reshape: If the input requires reshaping.
        :param ablation_mode: The type of ablation to perform.
        :param original_shape: Original shape of the input.
        :param output_shape: Input shape expected by the ViT. Usually means upscaling the input to 224 x 224.
        :param algorithm: Either 'salman2021' or 'levine2020'.
        :param device_type: Type of device on which the classifier is run, either `gpu` or `cpu`.
        
art/estimators/certification/derandomized_smoothing/ablators/pytorch.py