class_docstr: Residual block: x + F(x)
class_docstr_tok: ["Residual","block",":","x","+","F","(","x",")"]
code: def forward(self, x):
      if self.proj_block:
          if self.has_bn and self.has_st:
              x = self.bn(self.proj(x)) + self.f(x)
          elif not self.has_bn and self.has_st:
              x = self.proj(x) + self.f(x)
          else:
              x = self.f(x)
      else:
          if self.has_st:
              x = x + self.f(x)
          else:
              x = self.f(x)
      x = self.relu(x)
      return x
  
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 4 for calling the ResBlock obj's underlying member method code with example usage: obj.forward(x) and returns: x