class_docstr: EdgeTPU Residual block with expansion convolution followed by pointwise-linear w/ stride
class_docstr_tok: ["EdgeTPU","Residual","block","with","expansion","convolution","followed","by","pointwise-linear","w\/","stride"]
code: def __init__(
      self,
      in_chs,
      out_chs,
      exp_kernel_size=3,
      exp_ratio=1.0,
      fake_in_chs=0,
      stride=1,
      pad_type="",
      act_layer=nn.ReLU,
      noskip=False,
      pw_kernel_size=1,
      se_ratio=0.0,
      se_kwargs=None,
      norm_layer=nn.BatchNorm2d,
      norm_kwargs=None,
      drop_connect_rate=0.0,
  ):
      super(EdgeResidual, self).__init__()
      norm_kwargs = norm_kwargs or {}
      mid_chs = (
          make_divisible(fake_in_chs * exp_ratio)
          if fake_in_chs > 0
          else make_divisible(in_chs * exp_ratio)
      )
      self.has_residual = (
          in_chs == out_chs and stride == 1
      ) and not noskip
      self.drop_connect_rate = drop_connect_rate
  
      # Expansion convolution
      self.conv_exp = select_conv2d(
          in_chs, mid_chs, exp_kernel_size, padding=pad_type
      )
      self.bn1 = norm_layer(mid_chs, **norm_kwargs)
      self.act1 = act_layer(inplace=True)
  
      # Squeeze-and-excitation
      if se_ratio is not None and se_ratio > 0.0:
          se_kwargs = resolve_se_args(se_kwargs, in_chs, act_layer)
          self.se = SqueezeExcite(
              mid_chs, se_ratio=se_ratio, **se_kwargs
          )
      else:
          self.se = nn.Identity()
  
      # Point-wise linear projection
      self.conv_pwl = select_conv2d(
          mid_chs,
          out_chs,
          pw_kernel_size,
          stride=stride,
          padding=pad_type,
      )
      self.bn2 = nn.BatchNorm2d(out_chs, **norm_kwargs)
  
imports: import re
  from copy import deepcopy
  from .conv2d_layers import *
  from geffnet.activations import *
label_desc: Use image node_id 1 to create a new EdgeResidual object from inherited base classes: nn with example: obj = EdgeResidual(in_chs, out_chs, exp_kernel_size, exp_ratio, fake_in_chs, stride, pad_type, act_layer, noskip, pw_kernel_size, se_ratio, se_kwargs, norm_layer, norm_kwargs, drop_connect_rate)