def __init__(self, **kwargs):
        """
        Create a PyTorchVisionTransformer instance

        :param kwargs: keyword arguments required to create the mask embedder and the vision transformer class
        """
        self.to_drop_tokens = kwargs["drop_tokens"]

        if kwargs["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}")

        del kwargs["drop_tokens"]
        del kwargs["device_type"]

        super().__init__(**kwargs)
        self.ablation_mask_embedder.create(device=self.device, **kwargs)

        self.in_chans = kwargs["in_chans"]
        self.img_size = kwargs["img_size"]

        Create a PyTorchVisionTransformer instance

        :param kwargs: keyword arguments required to create the mask embedder and the vision transformer class
        
art/estimators/certification/derandomized_smoothing/vision_transformers/pytorch.py