class_docstr: Image to Patch Embedding
  
  Class adapted from the implementation in https://github.com/MadryLab/smoothed-vit
  
  Original License stated above.
class_docstr_tok: ["Image","to","Patch","Embedding","Class","adapted","from","the","implementation","in","https",":","\/\/github.com\/MadryLab\/smoothed-vit","Original","License","stated","above","."]
docstr: Forward pass through the embedder. We are simply tracking the positions of the ablation mask so no gradients
  are required.
  
  :param x: Input data corresponding to the ablation mask
  :return: The embedded input
docstr_tok: ["Forward","pass","through","the","embedder",".","We","are","simply","tracking","the","positions","of","the","ablation","mask","so","no","gradients","are","required",".",":","param","x",":","Input","data","corresponding","to","the","ablation","mask",":","return",":","The","embedded","input"]
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      """
      Forward pass through the embedder. We are simply tracking the positions of the ablation mask so no gradients
      are required.
  
      :param x: Input data corresponding to the ablation mask
      :return: The embedded input
      """
      if self.proj is not None:
          with torch.no_grad():
              x = self.proj(x).flatten(2).transpose(1, 2)
          return x
      raise ValueError("Projection layer not yet created.")
  
file_path: adversarial-robustness-toolbox/art/estimators/certification/derandomized_smoothing/vision_transformers/pytorch.py
imports: from typing import Optional
  import torch
  from timm.models.vision_transformer import VisionTransformer
label_desc: Use image node_id 3 for calling the PatchEmbed obj's underlying member method code with example usage: obj.forward(x) and returns: x