class_docstr: T5 style layer normalization module.
  
  Args:
      hidden_size (`int`):
          Size of the input hidden states.
      eps (`float`, `optional`, defaults to `1e-6`):
          A small value used for numerical stability to avoid dividing by zero.
class_docstr_tok: ["T5","style","layer","normalization","module",".","Args",":","hidden_size","(","`","int","`",")",":","Size","of","the","input","hidden","states",".","eps","(","`","float","`",",","`","optional","`",",","defaults","to","`","1e-6","`",")",":","A","small","value","used","for","numerical","stability","to","avoid","dividing","by","zero","."]
code: def forward(
      self, hidden_states: torch.FloatTensor
  ) -> torch.FloatTensor:
      # T5 uses a layer_norm which only scales and doesn't shift, which is also known as Root Mean
      # Square Layer Normalization https://arxiv.org/abs/1910.07467 thus variance is calculated
      # w/o mean and there is no bias. Additionally we want to make sure that the accumulation for
      # half-precision inputs is done in fp32
  
      variance = (
          hidden_states.to(torch.float32).pow(2).mean(-1, keepdim=True)
      )
      hidden_states = hidden_states * torch.rsqrt(
          variance + self.variance_epsilon
      )
  
      # convert into half-precision if necessary
      if self.weight.dtype in [torch.float16, torch.bfloat16]:
          hidden_states = hidden_states.to(self.weight.dtype)
  
      return self.weight * hidden_states
  
imports: import math
  from typing import Optional, Tuple
  import torch
  from torch import nn
  from ..configuration_utils import ConfigMixin, register_to_config
  from .attention_processor import Attention
  from .embeddings import get_timestep_embedding
  from .modeling_utils import ModelMixin
label_desc: Use image node_id 2 for calling the T5LayerNorm obj's underlying member method code with example usage: obj.forward(hidden_states) and returns: unknown