class_docstr: The basic residual block for ResNet-18 and ResNet-34 defined in :paper:`ResNet`,
  with two 3x3 conv layers and a projection shortcut if needed.
class_docstr_tok: ["The","basic","residual","block","for","ResNet-18","and","ResNet-34","defined","in",":","paper",":","`","ResNet","`",",","with","two","3x3","conv","layers","and","a","projection","shortcut","if","needed","."]
code: def forward(self, x):
      out = self.conv1(x)
      out = F.relu_(out)
      out = self.conv2(out)
  
      if self.shortcut is not None:
          shortcut = self.shortcut(x)
      else:
          shortcut = x
  
      out += shortcut
      out = F.relu_(out)
      return out
  
imports: import numpy
  import fvcore.nn.weight_init
  import torch
  import torch.nn.functional
  from torch import nn
  from detectron2.layers import CNNBlockBase, Conv2d, DeformConv, ModulatedDeformConv, ShapeSpec, get_norm
  from .backbone import Backbone
  from .build import BACKBONE_REGISTRY
label_desc: Use image node_id 2 for calling the BasicBlock obj's underlying member method code with example usage: obj.forward(x) and returns: out