class_docstr: Linear module.
docstr: Computes a linear transform of the input.
docstr_tok: ["Computes","a","linear","transform","of","the","input","."]
code: def __call__(
      self,
      inputs: jax.Array,
      *,
      precision: Optional[lax.Precision] = None,
  ) -> jax.Array:
      """Computes a linear transform of the input."""
      if not inputs.shape:
          raise ValueError("Input must not be scalar.")
  
      input_size = self.input_size = inputs.shape[-1]
      output_size = self.output_size
      dtype = inputs.dtype
  
      w_init = self.w_init
      if w_init is None:
          stddev = 1.0 / np.sqrt(self.input_size)
          w_init = hk.initializers.TruncatedNormal(stddev=stddev)
      w = hk.get_parameter(
          "w", [input_size, output_size], dtype, init=w_init
      )
  
      out = jnp.dot(inputs, w, precision=precision)
  
      if self.with_bias:
          b = hk.get_parameter(
              "b", [self.output_size], dtype, init=self.b_init
          )
          b = jnp.broadcast_to(b, out.shape)
          out = out + b
  
      return out
  
imports: from collections.abc import Iterable, Sequence
  import functools
  from typing import Any, Callable, Optional
  from haiku._src import base
  from haiku._src import initializers
  from haiku._src import module
  from haiku._src import typing
  from haiku._src.typing import PRNGKey
  import jax
  from jax import lax
  import jax.numpy
  import numpy
label_desc: Use image node_id 2 for calling the Linear obj's underlying member method code with example usage: obj.__call__(inputs) and returns: out