class_docstr: Wide Resnet with the softmax layer chopped off
class_docstr_tok: ["Wide","Resnet","with","the","softmax","layer","chopped","off"]
code: def __init__(self, input_shape, depth, widen_factor, dropout_rate):
      super(Wide_ResNet, self).__init__()
      self.in_planes = 16
  
      assert (depth - 4) % 6 == 0, "Wide-resnet depth should be 6n+4"
      n = (depth - 4) / 6
      k = widen_factor
  
      # print('| Wide-Resnet %dx%d' % (depth, k))
      nStages = [16, 16 * k, 32 * k, 64 * k]
  
      self.conv1 = conv3x3(input_shape[0], nStages[0])
      self.layer1 = self._wide_layer(
          wide_basic, nStages[1], n, dropout_rate, stride=1
      )
      self.layer2 = self._wide_layer(
          wide_basic, nStages[2], n, dropout_rate, stride=2
      )
      self.layer3 = self._wide_layer(
          wide_basic, nStages[3], n, dropout_rate, stride=2
      )
      self.bn1 = nn.BatchNorm2d(nStages[3], momentum=0.9)
  
      self.n_outputs = nStages[3]
  
file_path: generalized-moe/domainbed/lib/wide_resnet.py
imports: import sys
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.nn.init
  from torch.autograd import Variable
label_desc: Use image node_id 1 to create a new Wide_ResNet object from inherited base classes: nn with example: obj = Wide_ResNet(input_shape, depth, widen_factor, dropout_rate)