class_docstr: Vision Transformer (ViT), based on: "Dosovitskiy et al.,
  An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale <https://arxiv.org/abs/2010.11929>"
  
  Modified to also give same dimension outputs as the input size of the image
class_docstr_tok: ["Vision","Transformer","(","ViT",")",",","based","on",":","``","Dosovitskiy","et","al.",",","An","Image","is","Worth","16x16","Words",":","Transformers","for","Image","Recognition","at","Scale","<","https",":","\/\/arxiv.org\/abs\/2010.11929",">","''","Modified","to","also","give","same","dimension","outputs","as","the","input","size","of","the","image"]
docstr: Args:
      x: input tensor must have isotropic spatial dimensions,
          such as ``[batch_size, channels, sp_size, sp_size[, sp_size]]``.
docstr_tok: ["Args",":","x",":","input","tensor","must","have","isotropic","spatial","dimensions",",","such","as","``","[","batch_size",",","channels",",","sp_size",",","sp_size","[",",","sp_size","]","]","``","."]
code: def forward(self, x):
      """
      Args:
          x: input tensor must have isotropic spatial dimensions,
              such as ``[batch_size, channels, sp_size, sp_size[, sp_size]]``.
      """
      spatial_size = x.shape[2:]
      x = self.patch_embedding(x)
      hidden_states_out = []
      for blk in self.blocks:
          x = blk(x)
          hidden_states_out.append(x)
      x = self.norm(x)
      x = x.transpose(1, 2)
      d = [s // p for s, p in zip(spatial_size, self.patch_size)]
      x = torch.reshape(x, [x.shape[0], x.shape[1], *d])
      x = self.conv3d_transpose(x)
      x = self.conv3d_transpose_1(x)
      return x, hidden_states_out
  
file_path: MONAI/monai/networks/nets/vitautoenc.py
imports: from __future__ import annotations
  import math
  from collections.abc import Sequence
  import torch
  import torch.nn
  from monai.networks.blocks.patchembedding import PatchEmbeddingBlock
  from monai.networks.blocks.transformerblock import TransformerBlock
  from monai.networks.layers import Conv
  from monai.utils import deprecated_arg, ensure_tuple_rep, is_sqrt
label_desc: Use image node_id 2 for calling the ViTAutoEnc obj's underlying member method code with example usage: obj.forward(x) and returns: x,  hidden_states_out