code: def __init__(
      self,
      block,
      layers,
      dropout=0,
      num_features=512,
      zero_init_residual=False,
      groups=1,
      width_per_group=64,
      replace_stride_with_dilation=None,
      fp16=False,
  ):
      super(IResNet, self).__init__()
      self.fp16 = fp16
      self.inplanes = 64
      self.dilation = 1
      if replace_stride_with_dilation is None:
          replace_stride_with_dilation = [False, False, False]
      if len(replace_stride_with_dilation) != 3:
          raise ValueError(
              "replace_stride_with_dilation should be None "
              "or a 3-element tuple, got {}".format(
                  replace_stride_with_dilation
              )
          )
      self.groups = groups
      self.base_width = width_per_group
      self.conv1 = nn.Conv2d(
          3,
          self.inplanes,
          kernel_size=3,
          stride=1,
          padding=1,
          bias=False,
      )
      self.bn1 = nn.BatchNorm2d(self.inplanes, eps=1e-05)
      self.prelu = nn.ReLU(self.inplanes)
      self.layer1 = self._make_layer(block, 64, layers[0], stride=2)
      self.layer2 = self._make_layer(
          block,
          128,
          layers[1],
          stride=2,
          dilate=replace_stride_with_dilation[0],
      )
      self.layer3 = self._make_layer(
          block,
          256,
          layers[2],
          stride=2,
          dilate=replace_stride_with_dilation[1],
      )
      self.layer4 = self._make_layer(
          block,
          512,
          layers[3],
          stride=2,
          dilate=replace_stride_with_dilation[2],
      )
      self.bn2 = nn.BatchNorm2d(
          512 * block.expansion,
          eps=1e-05,
      )
      self.dropout = nn.Dropout(p=dropout, inplace=True)
      self.fc = nn.Linear(
          512 * block.expansion * self.fc_scale, num_features
      )
      self.features = nn.BatchNorm1d(num_features, eps=1e-05)
      nn.init.constant_(self.features.weight, 1.0)
      self.features.weight.requires_grad = False
  
      for m in self.modules():
          if isinstance(m, nn.Conv2d):
              nn.init.normal_(m.weight, 0, 0.1)
          elif isinstance(m, (nn.BatchNorm2d, nn.GroupNorm)):
              nn.init.constant_(m.weight, 1)
              nn.init.constant_(m.bias, 0)
  
      if zero_init_residual:
          for m in self.modules():
              if isinstance(m, IBasicBlock):
                  nn.init.constant_(m.bn2.weight, 0)
  
file_path: insightface/recognition/arcface_oneflow/backbones/ir_resnet.py
imports: import oneflow
  import oneflow.nn
  from typing import Type, Any, Callable, Union, List, Optional
label_desc: Use image node_id 1 to create a new IResNet object from inherited base classes: nn with example: obj = IResNet(block, layers, dropout, num_features, zero_init_residual, groups, width_per_group, replace_stride_with_dilation, fp16)