docstr: Args:
      in_chs: Number of input image channels.
      out_chs: Number of linear projection output channels.
      stride: Downsample stride.
      overlap: Use overlapping convolutions if True.
      norm_layer: Normalization layer.
docstr_tok: ["Args",":","in_chs",":","Number","of","input","image","channels",".","out_chs",":","Number","of","linear","projection","output","channels",".","stride",":","Downsample","stride",".","overlap",":","Use","overlapping","convolutions","if","True",".","norm_layer",":","Normalization","layer","."]
code: def __init__(
      self,
      in_chs: int,
      out_chs: int,
      stride: int = 4,
      overlap: bool = False,
      norm_layer: Optional[Callable] = None,
  ):
      """
  
      Args:
          in_chs: Number of input image channels.
          out_chs: Number of linear projection output channels.
          stride: Downsample stride.
          overlap: Use overlapping convolutions if True.
          norm_layer: Normalization layer.
      """
      super().__init__()
      self.stride = stride
      padding = 0
      kernel_size = stride
      if overlap:
          assert stride in (2, 4)
          if stride == 4:
              kernel_size, padding = 7, 2
          elif stride == 2:
              kernel_size, padding = 3, 1
      self.proj = nn.Conv2d(
          in_chs,
          out_chs,
          kernel_size=kernel_size,
          stride=stride,
          padding=padding,
      )
      self.norm = (
          norm_layer(out_chs)
          if norm_layer is not None
          else nn.Identity()
      )
  
imports: from functools import partial
  from typing import Callable, Optional, Tuple
  import torch
  import torch.nn
  import torch.utils.checkpoint
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import Mlp, DropPath, LayerNorm2d, trunc_normal_, ClassifierHead, NormMlpClassifierHead
  from ._builder import build_model_with_cfg
  from ._manipulate import named_apply
  from ._registry import generate_default_cfgs, register_model
label_desc: Use image node_id 1 to create a new Downsample object from inherited base classes: nn with example: obj = Downsample(in_chs, out_chs, stride, overlap, norm_layer)