class_docstr: A single Transformer Encoder Block.
code: def forward(self, x):
      y = self.mha(x)
      x = self.attn_add_norm(x, y)
      y = self.pos_wise_ff(y)
      return self.ff_add_norm(x, y)
  
imports: import math
  from typing import Optional
  import torch
  from einops import rearrange
  from torch import einsum, nn
  from pytorch_tabular.utils import _initialize_kaiming
  from .gated_units import GEGLU, PositionWiseFeedForward, ReGLU, SwiGLU
label_desc: Use image node_id 2 for calling the TransformerEncoderBlock obj's underlying member method code with example usage: obj.forward(x) and returns: self