class_docstr: LayerNorm that supports two data formats: channels_last (default) or channels_first.
  The ordering of the dimensions in the inputs. channels_last corresponds to inputs with shape (batch_size, height,
  width, channels) while channels_first corresponds to inputs with shape (batch_size, channels, height, width).
code: def forward(self, x: torch.Tensor) -> torch.Tensor:
      if self.data_format == "channels_last":
          x = torch.nn.functional.layer_norm(
              x, self.normalized_shape, self.weight, self.bias, self.eps
          )
      elif self.data_format == "channels_first":
          input_dtype = x.dtype
          x = x.float()
          u = x.mean(1, keepdim=True)
          s = (x - u).pow(2).mean(1, keepdim=True)
          x = (x - u) / torch.sqrt(s + self.eps)
          x = x.to(dtype=input_dtype)
          x = self.weight[:, None, None] * x + self.bias[:, None, None]
      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 ConvNextLayerNorm obj's underlying member method code with example usage: obj.forward(x) and returns: x