code: def __init__(self, inplanes, planes, stride):
      super(ResNetBasicblock, self).__init__()
      assert stride == 1 or stride == 2, "invalid stride {:}".format(
          stride
      )
      self.conv_a = ReLUConvBN(inplanes, planes, 3, stride, 1, 1)
      self.conv_b = ReLUConvBN(planes, planes, 3, 1, 1, 1)
      if stride == 2:
          self.downsample = nn.Sequential(
              nn.AvgPool2d(kernel_size=2, stride=2, padding=0),
              nn.Conv2d(
                  inplanes,
                  planes,
                  kernel_size=1,
                  stride=1,
                  padding=0,
                  bias=False,
              ),
          )
      elif inplanes != planes:
          self.downsample = ReLUConvBN(inplanes, planes, 1, 1, 0, 1)
      else:
          self.downsample = None
      self.in_dim = inplanes
      self.out_dim = planes
      self.stride = stride
      self.num_conv = 2
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new ResNetBasicblock object from inherited base classes: nn with example: obj = ResNetBasicblock(inplanes, planes, stride)