class_docstr: Deep Video Compression encoder module.
  
  Args:
      in_channels: Number of channels in image space.
      out_channels: Number of channels to output from encoder.
      filter_channels: Number of channels for intermediate layers.
      kernel_size: Size of convolution kernels.
      stride: Stride of convolutions.
      num_conv_layers: Number of convolution layers.
      use_gdn: Whether to use Generalized Divisive Normalization or
          BatchNorm.
class_docstr_tok: ["Deep","Video","Compression","encoder","module",".","Args",":","in_channels",":","Number","of","channels","in","image","space",".","out_channels",":","Number","of","channels","to","output","from","encoder",".","filter_channels",":","Number","of","channels","for","intermediate","layers",".","kernel_size",":","Size","of","convolution","kernels",".","stride",":","Stride","of","convolutions",".","num_conv_layers",":","Number","of","convolution","layers",".","use_gdn",":","Whether","to","use","Generalized","Divisive","Normalization","or","BatchNorm","."]
code: def __init__(
      self,
      in_channels: int = 2,
      out_channels: int = 128,
      filter_channels: int = 128,
      kernel_size: int = 3,
      stride: int = 2,
      num_conv_layers: int = 4,
      use_gdn: bool = True,
  ):
      super().__init__()
      padding = kernel_size // 2
      bias = True if use_gdn else False
  
      self.layers = nn.ModuleList()
      for _ in range(num_conv_layers - 1):
          self.layers.append(
              nn.Conv2d(
                  in_channels=in_channels,
                  out_channels=filter_channels,
                  kernel_size=kernel_size,
                  padding=padding,
                  stride=stride,
                  bias=bias,
              )
          )
          if use_gdn:
              self.layers.append(SimplifiedGDN(filter_channels))
          else:
              self.layers.append(nn.BatchNorm2d(filter_channels))
              self.layers.append(nn.ReLU())
  
          in_channels = filter_channels
  
      self.layers.append(
          nn.Conv2d(
              in_channels=in_channels,
              out_channels=out_channels,
              kernel_size=kernel_size,
              padding=padding,
              stride=stride,
              bias=True,
          )
      )
  
imports: from typing import Any, List, NamedTuple, Optional, Sequence, Tuple
  import torch
  import torch.nn.functional
  from compressai.entropy_models import EntropyBottleneck
  from torch import Tensor, nn
  import neuralcompression.functional
  from neuralcompression.layers import SimplifiedGDN, SimplifiedInverseGDN
label_desc: Use image node_id 1 to create a new DVCCompressionEncoder object from inherited base classes: nn with example: obj = DVCCompressionEncoder(in_channels, out_channels, filter_channels, kernel_size, stride, num_conv_layers, use_gdn)