class_docstr: A linear transformation applied over the last dimension of the input.
  
  Attributes:
    features: the number of output features.
    use_bias: whether to add a bias to the output (default: True).
    dtype: the dtype of the computation (default: infer from input and params).
    param_dtype: the dtype passed to parameter initializers (default: float32).
    precision: numerical precision of the computation see `jax.lax.Precision`
      for details.
    kernel_init: initializer function for the weight matrix.
    bias_init: initializer function for the bias.
code: def __init__(
      self,
      in_features: int,
      out_features: int,
      *,
      use_bias: bool = True,
      dtype: tp.Optional[Dtype] = None,
      param_dtype: Dtype = jnp.float32,
      precision: PrecisionLike = None,
      kernel_init: tp.Callable[
          [KeyArray, Shape, Dtype], Array
      ] = default_kernel_init,
      bias_init: tp.Callable[
          [KeyArray, Shape, Dtype], Array
      ] = initializers.zeros_init(),
      dot_general: DotGeneralT = lax.dot_general,
      rngs: rnglib.Rngs,
  ):
      kernel_key = rngs.params()
      self.kernel = nnx.Param(
          kernel_init(
              kernel_key, (in_features, out_features), param_dtype
          )
      )
      if use_bias:
          bias_key = rngs.params()
          self.bias = nnx.Param(
              bias_init(bias_key, (out_features,), param_dtype)
          )
      else:
          self.bias = nnx.Param(None)
  
      self.in_features = in_features
      self.out_features = out_features
      self.use_bias = use_bias
      self.dtype = dtype
      self.param_dtype = param_dtype
      self.precision = precision
      self.kernel_init = kernel_init
      self.bias_init = bias_init
      self.dot_general = dot_general
  
imports: from __future__ import annotations
  import typing
  from types import MappingProxyType
  import jax
  import jax.numpy
  import numpy
  from jax import lax
  from flax.experimental import nnx
  from flax.experimental.nnx.nnx import rnglib, variables
  from flax.experimental.nnx.nnx.module import Module
  from flax.experimental.nnx.nnx.nn import dtypes, initializers
label_desc: Use image node_id 1 to create a new Linear object from inherited base classes: Module with example: obj = Linear(in_features, out_features)