class_docstr: Residual block: x + F(x).
class_docstr_tok: ["Residual","block",":","x","+","F","(","x",")","."]
code: def __init__(
      self, w_in, w_out, stride, trans_fun, w_b=None, num_gs=1
  ):
      super().__init__()
      # Use skip connection with projection if shape changes
      self.proj_block = (w_in != w_out) or (stride != 1)
      if self.proj_block:
          self.proj = nn.Conv2d(
              w_in, w_out, 1, stride=stride, padding=0, bias=False
          )
          self.bn = nn.BatchNorm2d(w_out, eps=BN_EPS, momentum=BN_MOM)
      self.f = trans_fun(w_in, w_out, stride, w_b, num_gs)
      self.relu = nn.ReLU(RELU_INPLACE)
  
imports: import torch
  from torch import nn
label_desc: Use image node_id 1 to create a new ResBlock object from inherited base classes: nn with example: obj = ResBlock(w_in, w_out, stride, trans_fun, w_b, num_gs)