class_docstr: ConvNeXt
      A PyTorch impl of : `A ConvNet for the 2020s`  -
        https://arxiv.org/pdf/2201.03545.pdf
  
  Args:
      depths: Number of blocks at each stage. Default: [3, 3, 9, 3]
      dims: Feature dimension at each stage. Default: [96, 192, 384, 768]
      in_chans: Number of input image channels. Default: 3
      drop_path_rate: Stochastic depth rate. Default: 0.
      layer_scale_init_value: Init value for Layer Scale. Default: 1e-6.
class_docstr_tok: ["ConvNeXt","A","PyTorch","impl","of",":","`","A","ConvNet","for","the","2020s","`","-","https",":","\/\/arxiv.org\/pdf\/2201.03545.pdf","Args",":","depths",":","Number","of","blocks","at","each","stage",".","Default",":","[","3",",","3",",","9",",","3","]","dims",":","Feature","dimension","at","each","stage",".","Default",":","[","96",",","192",",","384",",","768","]","in_chans",":","Number","of","input","image","channels",".","Default",":","3","drop_path_rate",":","Stochastic","depth","rate",".","Default",":","0.","layer_scale_init_value",":","Init","value","for","Layer","Scale",".","Default",":","1e-6","."]
code: def __init__(
      self,
      depths: List[int],
      dims: List[int],
      in_chans: int = 3,
      drop_path_rate=0.0,
      layer_scale_init_value=1e-6,
  ):
      super().__init__()
  
      self.downsample_layers = (
          nn.ModuleList()
      )  # stem and 3 intermediate downsampling conv layers
      stem = nn.Sequential(
          nn.Conv2d(in_chans, dims[0], kernel_size=4, stride=4),
          LayerNorm(dims[0], eps=1e-6, data_format="channels_first"),
      )
      self.downsample_layers.append(stem)
      for i in range(3):
          downsample_layer = nn.Sequential(
              LayerNorm(
                  dims[i], eps=1e-6, data_format="channels_first"
              ),
              nn.Conv2d(dims[i], dims[i + 1], kernel_size=2, stride=2),
          )
          self.downsample_layers.append(downsample_layer)
  
      self.stages = (
          nn.ModuleList()
      )  # 4 feature resolution stages, each consisting of multiple residual blocks
      dp_rates = [
          x.item()
          for x in torch.linspace(0, drop_path_rate, sum(depths))
      ]
      cur = 0
      for i in range(4):
          stage = nn.Sequential(
              *[
                  Block(
                      dim=dims[i],
                      drop_path=dp_rates[cur + j],
                      layer_scale_init_value=layer_scale_init_value,
                  )
                  for j in range(depths[i])
              ]
          )
          self.stages.append(stage)
          cur += depths[i]
  
      self.norm = nn.LayerNorm(dims[-1], eps=1e-6)  # final norm layer
      self.apply(self._init_weights)
  
imports: from typing import List
  import torch
  import torch.nn
  import torch.nn.functional
  from vissl.config import AttrDict
  from vissl.models.model_helpers import DropPath, trunc_normal_
  from vissl.models.trunks import register_model_trunk
label_desc: Use image node_id 1 to create a new ConvNeXt object from inherited base classes: nn with example: obj = ConvNeXt(depths, dims, in_chans, drop_path_rate, layer_scale_init_value)