code: def __init__(self, in_channels, out_channels=None):
      super(ResBlock, self).__init__()
      self.in_channels = in_channels
      self.out_channels = (
          in_channels if out_channels is None else out_channels
      )
      self.norm1 = normalize(in_channels)
      self.conv1 = nn.Conv2d(
          in_channels, out_channels, kernel_size=3, stride=1, padding=1
      )
      self.norm2 = normalize(out_channels)
      self.conv2 = nn.Conv2d(
          out_channels, out_channels, kernel_size=3, stride=1, padding=1
      )
      if self.in_channels != self.out_channels:
          self.conv_out = nn.Conv2d(
              in_channels,
              out_channels,
              kernel_size=1,
              stride=1,
              padding=0,
          )
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from basicsr.utils import get_root_logger
  from basicsr.utils.registry import ARCH_REGISTRY
label_desc: Use image node_id 1 to create a new ResBlock object from inherited base classes: nn with example: obj = ResBlock(in_channels, out_channels)