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 ([`ConvNextConfig`]): Model configuration class.
      dim (`int`): Number of input channels.
      drop_path (`float`): Stochastic depth rate. Default: 0.0.
code: def forward(self, hidden_states: torch.FloatTensor) -> torch.Tensor:
      input = hidden_states
      x = self.dwconv(hidden_states)
      x = x.permute(0, 2, 3, 1)  # (N, C, H, W) -> (N, H, W, C)
      x = self.layernorm(x)
      x = self.pwconv1(x)
      x = self.act(x)
      x = self.pwconv2(x)
      if self.layer_scale_parameter is not None:
          x = self.layer_scale_parameter * x
      x = x.permute(0, 3, 1, 2)  # (N, H, W, C) -> (N, C, H, W)
  
      x = input + self.drop_path(x)
      return x
  
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_convnext import ConvNextConfig
label_desc: Use image node_id 2 for calling the ConvNextLayer obj's underlying member method code with example usage: obj.forward(hidden_states) and returns: x