class_docstr: Channel normalization layer.
  
  This implements the channel normalization layer as described in the
  following paper:
  
  High-Fidelity Generative Image Compression
  F. Mentzer, G. Toderici, M. Tschannen, E. Agustsson
  
  Using this layer provides more stability to model outputs when there is a
  shift in image resolutions between the training set and the test set.
  
  Args:
      input_channels: Number of channels to normalize.
      epsilon: Divide-by-0 protection parameter.
      affine: Whether to include affine parameters for the noramlized output.
code: def forward(self, x: Tensor) -> Tensor:
      mean = torch.mean(x, dim=1, keepdim=True)
      variance = torch.var(x, dim=1, keepdim=True)
  
      x_normed = (x - mean) * torch.rsqrt(variance + self.epsilon)
  
      if self.affine is True:
          x_normed = self.gamma * x_normed + self.beta
  
      return x_normed
  
imports: import torch
  import torch.nn
  from torch import Tensor
label_desc: Use image node_id 2 for calling the ChannelNorm2D obj's underlying member method code with example usage: obj.forward(x) and returns: x_normed