code: def __init__(
      self,
      input_channels: int,
      output_channels: int,
      reduction=2,
      activation: Callable = nn.ReLU,
  ):
      super(HGResidualBlock, self).__init__()
  
      mid_channels = input_channels // reduction
  
      self.bn1 = nn.BatchNorm2d(input_channels)
      self.act1 = activation(inplace=True)
      self.conv1 = nn.Conv2d(
          input_channels, mid_channels, kernel_size=1, bias=False
      )
  
      self.bn2 = nn.BatchNorm2d(mid_channels)
      self.act2 = activation(inplace=True)
      self.conv2 = nn.Conv2d(
          mid_channels,
          mid_channels,
          kernel_size=3,
          padding=1,
          bias=False,
      )
  
      self.bn3 = nn.BatchNorm2d(mid_channels)
      self.act3 = activation(inplace=True)
      self.conv3 = nn.Conv2d(
          mid_channels, output_channels, kernel_size=1, bias=True
      )
  
      if input_channels == output_channels:
          self.skip_layer = nn.Identity()
      else:
          self.skip_layer = nn.Conv2d(
              input_channels, output_channels, kernel_size=1
          )
          torch.nn.init.zeros_(self.skip_layer.bias)
  
      torch.nn.init.zeros_(self.conv3.bias)
  
imports: import inspect
  from collections import OrderedDict
  from typing import List, Callable, Tuple
  import torch
  from pytorch_toolbelt.modules import ACT_RELU, get_activation_block
  from pytorch_toolbelt.modules.encoders import EncoderModule, make_n_channel_input
  from torch import nn, Tensor
label_desc: Use image node_id 1 to create a new HGResidualBlock object from inherited base classes: nn with example: obj = HGResidualBlock(input_channels, output_channels, reduction, activation)