class_docstr: Transformer block described in ViT.
  Paper: https://arxiv.org/abs/2010.11929
  Based on: https://github.com/lucidrains/vit-pytorch
code: def __init__(self, dim, depth, heads, dim_head, mlp_dim, dropout=0.0):
      super().__init__()
      self.layers = nn.ModuleList([])
      for _ in range(depth):
          self.layers.append(
              nn.ModuleList(
                  [
                      Attention(dim, heads, dim_head, dropout),
                      FeedForward(dim, mlp_dim, dropout),
                  ]
              )
          )
  
imports: import torch
  import torch.nn
  from einops import rearrange
  from einops.layers.torch import Reduce
label_desc: Use image node_id 1 to create a new Transformer object from inherited base classes: nn with example: obj = Transformer(dim, depth, heads, dim_head, mlp_dim, dropout)