class_docstr: Inspired by torch.nn.TransformerEncoderLayer and
  rwightman's timm package.
class_docstr_tok: ["Inspired","by","torch.nn.TransformerEncoderLayer","and","rwightman","'s","timm","package","."]
code: def forward(self, src, *args, **kwargs):
      src = src + self.drop_path(self.self_attn(self.pre_norm(src)))
      src = self.norm1(src)
      src2 = self.linear2(
          self.dropout1(self.activation(self.linear1(src)))
      )
      src = src + self.drop_path(self.dropout2(src2))
      return src
  
imports: import torch
  from torch import nn, einsum
  import torch.nn.functional
  from einops import rearrange, repeat
label_desc: Use image node_id 2 for calling the TransformerEncoderLayer obj's underlying member method code with example usage: obj.forward(src) and returns: src