def forward_features(self, x: torch.Tensor) -> torch.Tensor:
        """
        The forward pass of the ViT.

        :param x: Input data.
        :return: The input processed by the ViT backbone
        """

        ablated_input = False
        if x.shape[1] == self.in_chans + 1:
            ablated_input = True

        if ablated_input:
            x, ablation_mask = x[:, : self.in_chans], x[:, self.in_chans : self.in_chans + 1]

        x = self.patch_embed(x)
        x = self._pos_embed(x)

        if self.to_drop_tokens and ablated_input:
            ones = self.ablation_mask_embedder(ablation_mask)
            to_drop = torch.sum(ones, dim=2)
            indexes = torch.gt(torch.where(to_drop > 1, 1, 0), 0)
            x = self.drop_tokens(x, indexes)

        x = self.norm_pre(x)
        x = self.blocks(x)
        return self.norm(x)

        The forward pass of the ViT.

        :param x: Input data.
        :return: The input processed by the ViT backbone
        
art/estimators/certification/derandomized_smoothing/vision_transformers/pytorch.py