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, groups=1
  ):
      super(ResBlock, self).__init__()
      self.proj, self.bn = None, None
      if (w_in != w_out) or (stride != 1):
          self.proj = conv2d(w_in, w_out, 1, stride=stride)
          self.bn = norm2d(w_out)
      self.f = trans_fun(w_in, w_out, stride, w_b, groups)
      self.af = activation()
  
imports: from pycls.core.config import cfg
  from pycls.models.blocks import activation, conv2d, conv2d_cx, gap2d, gap2d_cx, init_weights, linear, linear_cx, norm2d, norm2d_cx, pool2d, pool2d_cx
  from torch.nn import Module
label_desc: Use image node_id 1 to create a new ResBlock object from inherited base classes: Module with example: obj = ResBlock(w_in, w_out, stride, trans_fun, w_b, groups)