code: def __init__(
      self,
      inplanes,
      planes,
      stride=1,
      downsample=None,
      use_conv1x1=False,
      plugins=None,
  ):
      super().__init__()
  
      if use_conv1x1:
          self.conv1 = conv1x1(inplanes, planes)
          self.conv2 = conv3x3(planes, planes * self.expansion, stride)
      else:
          self.conv1 = conv3x3(inplanes, planes, stride)
          self.conv2 = conv3x3(planes, planes * self.expansion)
  
      self.with_plugins = False
      if plugins:
          if isinstance(plugins, dict):
              plugins = [plugins]
          self.with_plugins = True
          # collect plugins for conv1/conv2/
          self.before_conv1_plugin = [
              plugin["cfg"]
              for plugin in plugins
              if plugin["position"] == "before_conv1"
          ]
          self.after_conv1_plugin = [
              plugin["cfg"]
              for plugin in plugins
              if plugin["position"] == "after_conv1"
          ]
          self.after_conv2_plugin = [
              plugin["cfg"]
              for plugin in plugins
              if plugin["position"] == "after_conv2"
          ]
          self.after_shortcut_plugin = [
              plugin["cfg"]
              for plugin in plugins
              if plugin["position"] == "after_shortcut"
          ]
  
      self.planes = planes
      self.bn1 = nn.BatchNorm2d(planes)
      self.relu = nn.ReLU(inplace=True)
      self.bn2 = nn.BatchNorm2d(planes * self.expansion)
      self.downsample = downsample
      self.stride = stride
  
      if self.with_plugins:
          self.before_conv1_plugin_names = self.make_block_plugins(
              inplanes, self.before_conv1_plugin
          )
          self.after_conv1_plugin_names = self.make_block_plugins(
              planes, self.after_conv1_plugin
          )
          self.after_conv2_plugin_names = self.make_block_plugins(
              planes, self.after_conv2_plugin
          )
          self.after_shortcut_plugin_names = self.make_block_plugins(
              planes, self.after_shortcut_plugin
          )
  
file_path: mmocr/mmocr/models/textrecog/layers/conv_layer.py
imports: import torch.nn
  from mmcv.cnn import build_plugin_layer
label_desc: Use image node_id 1 to create a new BasicBlock object from inherited base classes: nn with example: obj = BasicBlock(inplanes, planes, stride, downsample, use_conv1x1, plugins)