class_docstr: Grouped convolution block.
class_docstr_tok: ["Grouped","convolution","block","."]
code: def __init__(
      self, in_planes, cardinality=32, bottleneck_width=4, stride=1
  ):
      super(Block, self).__init__()
      group_width = cardinality * bottleneck_width
      self.conv1 = nn.Conv2d(
          in_planes, group_width, kernel_size=1, bias=False
      )
      self.bn1 = nn.BatchNorm2d(group_width)
      self.conv2 = nn.Conv2d(
          group_width,
          group_width,
          kernel_size=3,
          stride=stride,
          padding=1,
          groups=cardinality,
          bias=False,
      )
      self.bn2 = nn.BatchNorm2d(group_width)
      self.conv3 = nn.Conv2d(
          group_width,
          self.expansion * group_width,
          kernel_size=1,
          bias=False,
      )
      self.bn3 = nn.BatchNorm2d(self.expansion * group_width)
  
      self.shortcut = nn.Sequential()
      if stride != 1 or in_planes != self.expansion * group_width:
          self.shortcut = nn.Sequential(
              nn.Conv2d(
                  in_planes,
                  self.expansion * group_width,
                  kernel_size=1,
                  stride=stride,
                  bias=False,
              ),
              nn.BatchNorm2d(self.expansion * group_width),
          )
  
file_path: nni/examples/trials/cifar10_pytorch/models/resnext.py
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new Block object from inherited base classes: nn with example: obj = Block(in_planes, cardinality, bottleneck_width, stride)