class_docstr: Layer normalization.
class_docstr_tok: ["Layer","normalization","."]
code: def forward(self, x):
      scale, bias = self.weights
      mean = jnp.mean(x, axis=-1, keepdims=True)
      centered = x - mean if self._center else x
      variance = jnp.mean(centered * centered, axis=-1, keepdims=True)
      norm_inputs = centered / jnp.sqrt(variance + self._epsilon)
      scaled = norm_inputs * scale
      return scaled + bias if self._center else scaled
  
imports: from trax.fastmath import numpy
  from trax.layers import base
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: unknown