class_docstr: Residual block: x + F(x)
class_docstr_tok: ["Residual","block",":","x","+","F","(","x",")"]
code: def _construct(self, w_in, w_out, stride, trans_fun, w_b, num_gs):
      # Use skip connection with projection if shape changes
      self.proj_block = (w_in != w_out) or (stride != 1)
      if self.proj_block and self.has_st:
          self._add_skip_proj(w_in, w_out, stride)
      self.f = trans_fun(
          w_in, w_out, stride, self.has_bn, self.use_srelu, w_b, num_gs
      )
      self.relu = nn.ReLU(True) if not self.use_srelu else SReLU(w_out)
  
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 3 for calling the ResBlock obj's underlying member method code with example usage: obj._construct(w_in, w_out, stride, trans_fun, w_b, num_gs) without return types