class_docstr: SpectralNormalizedLinear module.
  
  This is a Linear layer with a upper-bounded Lipschitz. It is used in iResNet.
  
  Reference:
    Behrmann et al. Invertible Residual Networks. ICML 2019.
    https://arxiv.org/pdf/1811.00995.pdf
class_docstr_tok: ["SpectralNormalizedLinear","module",".","This","is","a","Linear","layer","with","a","upper-bounded","Lipschitz",".","It","is","used","in","iResNet",".","Reference",":","Behrmann","et","al",".","Invertible","Residual","Networks",".","ICML","2019.","https",":","\/\/arxiv.org\/pdf\/1811.00995.pdf"]
docstr: Computes a linear transform of the input.
docstr_tok: ["Computes","a","linear","transform","of","the","input","."]
code: def __call__(self, inputs: jnp.ndarray) -> jnp.ndarray:
      """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
      )
      w = self.get_normalized_weights(w, renormalize=True)
  
      out = jnp.dot(inputs, w)
  
      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: import dataclasses
  import functools
  from typing import Any, Callable, Generic, Iterable, Optional
  from acme import specs
  from acme import types
  from acme.jax import networks
  from acme.jax import utils
  from acme.jax.imitation_learning_types import DirectRLNetworks
  import haiku
  import jax
  from jax import numpy
  import numpy
label_desc: Use image node_id 3 for calling the SpectralNormalizedLinear obj's underlying member method code with example usage: obj.__call__(inputs) and returns: out