class_docstr: Residual MLP block w/ LayerScale and Affine 'norm'
  
  Based on: `ResMLP: Feedforward networks for image classification...` - https://arxiv.org/abs/2105.03404
code: def __init__(
      self,
      dim,
      seq_len,
      mlp_ratio=4,
      mlp_layer=Mlp,
      norm_layer=Affine,
      act_layer=nn.GELU,
      init_values=1e-4,
      drop=0.0,
      drop_path=0.0,
  ):
      super().__init__()
      channel_dim = int(dim * mlp_ratio)
      self.norm1 = norm_layer(dim)
      self.linear_tokens = nn.Linear(seq_len, seq_len)
      self.drop_path = (
          DropPath(drop_path) if drop_path > 0.0 else nn.Identity()
      )
      self.norm2 = norm_layer(dim)
      self.mlp_channels = mlp_layer(
          dim, channel_dim, act_layer=act_layer, drop=drop
      )
      self.ls1 = nn.Parameter(init_values * torch.ones(dim))
      self.ls2 = nn.Parameter(init_values * torch.ones(dim))
  
imports: import math
  from functools import partial
  import torch
  import torch.nn
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import PatchEmbed, Mlp, GluMlp, GatedMlp, DropPath, lecun_normal_, to_2tuple
  from ._builder import build_model_with_cfg
  from ._manipulate import named_apply, checkpoint_seq
  from ._registry import generate_default_cfgs, register_model, register_model_deprecations
label_desc: Use image node_id 1 to create a new ResBlock object from inherited base classes: nn with example: obj = ResBlock(dim, seq_len, mlp_ratio, mlp_layer, norm_layer, act_layer, init_values, drop, drop_path)