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).
  
  Args:
      normalized_shape (`int`): input shape from an expected input size
      eps (`float`): a value added to the denominator for numerical stability
      data_format (`str`): either "channels_last" or "channels_first"  to differ input shapes
class_docstr_tok: ["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",")",".","Args",":","normalized_shape","(","`","int","`",")",":","input","shape","from","an","expected","input","size","eps","(","`","float","`",")",":","a","value","added","to","the","denominator","for","numerical","stability","data_format","(","`","str","`",")",":","either","``","channels_last","''","or","``","channels_first","''","to","differ","input","shapes"]
code: def forward(self, x):
      if self.data_format == "channels_last":
          return nn.functional.layer_norm(
              x, self.normalized_shape, self.weight, self.bias, self.eps
          )
      elif self.data_format == "channels_first":
          u = x.mean(1, keepdim=True)
          s = (x - u).pow(2).mean(1, keepdim=True)
          x = (x - u) / torch.sqrt(s + self.eps)
          x = self.weight[:, None, None] * x + self.bias[:, None, None]
          return x
  
file_path: towhee/towhee/models/convnext/utils.py
imports: import torch
  from torch import nn
  from towhee.models.layers.droppath import DropPath
label_desc: Use image node_id 2 for calling the LayerNorm obj's underlying member method code with example usage: obj.forward(x) and returns: nn, x