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).
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",")","."]
code: def __init__(
      self, normalized_shape, eps=1e-6, data_format="channels_last"
  ):
      super().__init__()
      self.weight = nn.Parameter(
          torch.ones(normalized_shape), requires_grad=True
      )
      self.bias = nn.Parameter(
          torch.zeros(normalized_shape), requires_grad=True
      )
      self.eps = eps
      self.data_format = data_format
      if self.data_format not in ["channels_last", "channels_first"]:
          raise ValueError(
              f"not support data format '{self.data_format}'"
          )
      self.normalized_shape = (normalized_shape,)
  
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new LayerNorm object from inherited base classes: nn with example: obj = LayerNorm(normalized_shape, eps, data_format)