class_docstr: Pyramidal optical flow estimation.
  
  This estimates the optical flow at `levels` different pyramidal scales. It
  should be trained in conjunction with a pyramidal optical flow supervision
  signal.
  
  Args:
      in_channels: Number of input channels. Typically uses two 3-channel
          images, plus an initial flow with 2 more channels.
      filter_counts: Number of filters for each stage of pyramid. Defaults
          to ``[32, 64, 32, 16, 2]``.
      kernel_size: Kernel size of filters.
      levels: Number of pyramid levels.
class_docstr_tok: ["Pyramidal","optical","flow","estimation",".","This","estimates","the","optical","flow","at","`","levels","`","different","pyramidal","scales",".","It","should","be","trained","in","conjunction","with","a","pyramidal","optical","flow","supervision","signal",".","Args",":","in_channels",":","Number","of","input","channels",".","Typically","uses","two","3-channel","images",",","plus","an","initial","flow","with","2","more","channels",".","filter_counts",":","Number","of","filters","for","each","stage","of","pyramid",".","Defaults","to","``","[","32",",","64",",","32",",","16",",","2","]","``",".","kernel_size",":","Kernel","size","of","filters",".","levels",":","Number","of","pyramid","levels","."]
code: def __init__(
      self,
      in_channels: int = 8,
      filter_counts: Optional[Sequence[int]] = None,
      kernel_size: int = 7,
      levels: int = 5,
  ):
      super().__init__()
      if filter_counts is None:
          filter_counts = [32, 64, 32, 16, 2]
      padding = kernel_size // 2
      self.model_levels = nn.ModuleList()
  
      for _ in range(levels):
          current_in_channels = in_channels
          layers: List[nn.Module] = []
          for i, filter_count in enumerate(filter_counts):
              layers.append(
                  nn.Conv2d(
                      in_channels=current_in_channels,
                      out_channels=filter_count,
                      kernel_size=kernel_size,
                      padding=padding,
                  )
              )
              if i < len(filter_counts) - 1:
                  layers.append(nn.ReLU())
  
              current_in_channels = filter_count
  
          self.model_levels.append(nn.Sequential(*layers))
  
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 DVCPyramidFlowEstimator object from inherited base classes: nn with example: obj = DVCPyramidFlowEstimator(in_channels, filter_counts, kernel_size, levels)