code: def __init__(
      self,
      depth,
      num_classes,
      widen_factor=1,
      drop_rate=0.0,
      color_channels=3,
      block=BasicBlock,
  ):
      super(WideResNet, self).__init__()
      num_channels = [
          16,
          int(16 * widen_factor),
          int(32 * widen_factor),
          int(64 * widen_factor),
      ]
      assert (depth - 4) % 6 == 0
      num_blocks = (depth - 4) / 6
  
      self.conv1 = nn.Conv2d(
          color_channels,
          num_channels[0],
          kernel_size=3,
          stride=1,
          padding=1,
          bias=False,
      )
      self.convgroup1 = ConvGroup(
          num_blocks,
          num_channels[0],
          num_channels[1],
          block,
          1,
          drop_rate,
      )
      self.convgroup2 = ConvGroup(
          num_blocks,
          num_channels[1],
          num_channels[2],
          block,
          2,
          drop_rate,
      )
      self.convgroup3 = ConvGroup(
          num_blocks,
          num_channels[2],
          num_channels[3],
          block,
          2,
          drop_rate,
      )
      # global average pooling and classifier
      self.bn1 = nn.BatchNorm2d(num_channels[3])
      self.relu = nn.ReLU(inplace=True)
      self.fc = nn.Linear(num_channels[3], num_classes)
      self.num_channels = num_channels[3]
  
      for mod in self.modules():
          if isinstance(mod, nn.Conv2d):
              n = (
                  mod.kernel_size[0]
                  * mod.kernel_size[1]
                  * mod.out_channels
              )
              mod.weight.data.normal_(0, math.sqrt(2.0 / n))
          elif isinstance(mod, nn.BatchNorm2d):
              mod.weight.data.fill_(1)
              mod.bias.data.zero_()
          elif isinstance(mod, nn.Linear):
              mod.bias.data.zero_()
  
imports: import math
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new WideResNet object from inherited base classes: nn with example: obj = WideResNet(depth, num_classes, widen_factor, drop_rate, color_channels, block)