def _get_vit_features(self, input_tensor: torch.Tensor) -> list[torch.Tensor]:
        """Get Vision Transformers (ViT) features.

        Args:
            input_tensor (torch.Tensor): Input Tensor.

        Returns:
            list[torch.Tensor]: List of features.
        """
        feature = self.feature_extractor.patch_embed(input_tensor)
        cls_token = self.feature_extractor.cls_token.expand(feature.shape[0], -1, -1)
        if self.feature_extractor.dist_token is None:
            feature = torch.cat((cls_token, feature), dim=1)
        else:
            feature = torch.cat(
                (
                    cls_token,
                    self.feature_extractor.dist_token.expand(feature.shape[0], -1, -1),
                    feature,
                ),
                dim=1,
            )
        feature = self.feature_extractor.pos_drop(feature + self.feature_extractor.pos_embed)
        for i in range(8):  # paper Table 6. Block Index = 7
            feature = self.feature_extractor.blocks[i](feature)
        feature = self.feature_extractor.norm(feature)
        feature = feature[:, 2:, :]
        batch_size, _, num_channels = feature.shape
        feature = feature.permute(0, 2, 1)
        feature = feature.reshape(batch_size, num_channels, self.input_size[0] // 16, self.input_size[1] // 16)
        return [feature]
Get Vision Transformers (ViT) features.

        Args:
            input_tensor (torch.Tensor): Input Tensor.

        Returns:
            list[torch.Tensor]: List of features.
        
src/anomalib/models/image/fastflow/torch_model.py