class_docstr: This corresponds to the `Block` class in the original implementation.
  
  There are two equivalent implementations: [DwConv, LayerNorm (channels_first), Conv, GELU,1x1 Conv]; all in (N, C,
  H, W) (2) [DwConv, Permute to (N, H, W, C), LayerNorm (channels_last), Linear, GELU, Linear]; Permute back
  
  The authors used (2) as they find it slightly faster in PyTorch.
  
  Args:
      config ([`ConvNextV2Config`]): Model configuration class.
      dim (`int`): Number of input channels.
      drop_path (`float`): Stochastic depth rate. Default: 0.0.
class_docstr_tok: ["This","corresponds","to","the","`","Block","`","class","in","the","original","implementation",".","There","are","two","equivalent","implementations",":","[","DwConv",",","LayerNorm","(","channels_first",")",",","Conv",",","GELU,1x1","Conv","]",";","all","in","(","N",",","C",",","H",",","W",")","(","2",")","[","DwConv",",","Permute","to","(","N",",","H",",","W",",","C",")",",","LayerNorm","(","channels_last",")",",","Linear",",","GELU",",","Linear","]",";","Permute","back","The","authors","used","(","2",")","as","they","find","it","slightly","faster","in","PyTorch",".","Args",":","config","(","[","`","ConvNextV2Config","`","]",")",":","Model","configuration","class",".","dim","(","`","int","`",")",":","Number","of","input","channels",".","drop_path","(","`","float","`",")",":","Stochastic","depth","rate",".","Default",":","0.0","."]
code: def __init__(self, config, dim, drop_path=0):
      super().__init__()
      # depthwise conv
      self.dwconv = nn.Conv2d(
          dim, dim, kernel_size=7, padding=3, groups=dim
      )
      self.layernorm = ConvNextV2LayerNorm(dim, eps=1e-6)
      # pointwise/1x1 convs, implemented with linear layers
      self.pwconv1 = nn.Linear(dim, 4 * dim)
      self.act = ACT2FN[config.hidden_act]
      self.grn = ConvNextV2GRN(4 * dim)
      self.pwconv2 = nn.Linear(4 * dim, dim)
      self.drop_path = (
          ConvNextV2DropPath(drop_path)
          if drop_path > 0.0
          else nn.Identity()
      )
  
imports: from typing import Optional, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from ...activations import ACT2FN
  from ...modeling_outputs import BackboneOutput, BaseModelOutputWithNoAttention, BaseModelOutputWithPoolingAndNoAttention, ImageClassifierOutputWithNoAttention
  from ...modeling_utils import PreTrainedModel
  from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from ...utils.backbone_utils import BackboneMixin
  from .configuration_convnextv2 import ConvNextV2Config
label_desc: Use image node_id 1 to create a new ConvNextV2Layer object from inherited base classes: nn with example: obj = ConvNextV2Layer(config, dim, drop_path)