class_docstr: ResNet with GroupNorm and Weight Standardization.
class_docstr_tok: ["ResNet","with","GroupNorm","and","Weight","Standardization","."]
code: def __init__(self, cin, cout=None, cmid=None, stride=1):
      super().__init__()
      cout = cout or cin
      cmid = cmid or cout // 4
  
      self.gn1 = nn.GroupNorm(32, cmid, epsilon=1e-6)
      self.conv1 = conv1x1(cin, cmid, bias=False)
      self.gn2 = nn.GroupNorm(32, cmid, epsilon=1e-6)
      self.conv2 = conv3x3(
          cmid, cmid, stride, bias=False
      )  # Original code has it on conv1!!
      self.gn3 = nn.GroupNorm(32, cout, epsilon=1e-6)
      self.conv3 = conv1x1(cmid, cout, bias=False)
      self.relu = nn.ReLU()
  
      if stride != 1 or cin != cout:
          # Projection also with pre-activation according to paper.
          self.downsample = conv1x1(cin, cout, stride, bias=False)
          self.gn_proj = nn.GroupNorm(cout, cout)
  
file_path: PaddleSeg/contrib/MedicalSeg/medicalseg/models/backbones/resnet.py
imports: from os.path import join
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from medicalseg.cvlibs import manager
label_desc: Use image node_id 1 to create a new Bottleneck object from inherited base classes: nn with example: obj = Bottleneck(cin, cout, cmid, stride)