code: def __init__(self, in_channels: int, with_conv: bool):
      super().__init__()
      self.with_conv = with_conv
      if self.with_conv:
          # no asymmetric padding in torch conv, must do it ourselves
          self.conv = torch.nn.Conv2d(
              in_channels,
              in_channels,
              kernel_size=3,
              stride=2,
              padding=0,
          )
  
imports: import logging
  from typing import Optional, Sequence
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from neuralcompression.layers import XCA, ChannelNorm2D
  from .._outputs._vqvae_autoencoder_output import VqVaeAutoencoderOutput
label_desc: Use image node_id 1 to create a new _Downsample object from inherited base classes: nn with example: obj = _Downsample(in_channels, with_conv)