class_docstr: A depthwise separable / fused mbconv style residual block with SE, `no norm.
      
class_docstr_tok: ["A","depthwise","separable","\/","fused","mbconv","style","residual","block","with","SE",",","`","no","norm","."]
code: def __init__(
      self,
      in_chs,
      out_chs=None,
      expand_ratio=1.0,
      attn_layer="se",
      bias=False,
      act_layer=nn.GELU,
  ):
      super().__init__()
      attn_kwargs = dict(act_layer=act_layer)
      if (
          isinstance(attn_layer, str)
          and attn_layer == "se"
          or attn_layer == "eca"
      ):
          attn_kwargs["rd_ratio"] = 0.25
          attn_kwargs["bias"] = False
      attn_layer = get_attn(attn_layer)
      out_chs = out_chs or in_chs
      mid_chs = int(expand_ratio * in_chs)
  
      self.conv_dw = nn.Conv2d(
          in_chs, mid_chs, 3, 1, 1, groups=in_chs, bias=bias
      )
      self.act = act_layer()
      self.se = attn_layer(mid_chs, **attn_kwargs)
      self.conv_pw = nn.Conv2d(mid_chs, out_chs, 1, 1, 0, bias=bias)
  
imports: import math
  from functools import partial
  from typing import Callable, List, Optional, Tuple, Union
  import torch
  import torch.nn
  import torch.utils.checkpoint
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import DropPath, to_2tuple, to_ntuple, Mlp, ClassifierHead, LayerNorm2d, get_attn, get_act_layer, get_norm_layer, RelPosBias, _assert
  from ._builder import build_model_with_cfg
  from ._features_fx import register_notrace_function
  from ._manipulate import named_apply
  from ._registry import register_model, generate_default_cfgs
label_desc: Use image node_id 1 to create a new MbConvBlock object from inherited base classes: nn with example: obj = MbConvBlock(in_chs, out_chs, expand_ratio, attn_layer, bias, act_layer)