class_docstr: Non-convolutional value and policy networks for SAC.
docstr: Calls the SAC actor/critic networks.
  
  This has two important purposes:
    1. It is used to initialize all parameters of both networks.
    2. It is used to efficiently calculate the outputs of both the actor
      and critic networks on a single input.
  
  Args:
    state: An input state.
    key: A PRNGKey to use to sample an action from the actor's output
      distribution.
    mean_action: If True, it will use the actor's mean action to feed to the
      value network. Otherwise, it will use the sampled action.
  
  Returns:
    A named tuple containing the outputs from both networks.
docstr_tok: ["Calls","the","SAC","actor\/critic","networks",".","This","has","two","important","purposes",":","1",".","It","is","used","to","initialize","all","parameters","of","both","networks",".","2",".","It","is","used","to","efficiently","calculate","the","outputs","of","both","the","actor","and","critic","networks","on","a","single","input",".","Args",":","state",":","An","input","state",".","key",":","A","PRNGKey","to","use","to","sample","an","action","from","the","actor","'s","output","distribution",".","mean_action",":","If","True",",","it","will","use","the","actor","'s","mean","action","to","feed","to","the","value","network",".","Otherwise",",","it","will","use","the","sampled","action",".","Returns",":","A","named","tuple","containing","the","outputs","from","both","networks","."]
code: def __call__(
      self,
      state: jnp.ndarray,
      key: jnp.ndarray,
      mean_action: bool = True,
  ) -> SacOutput:
      """Calls the SAC actor/critic networks.
  
      This has two important purposes:
        1. It is used to initialize all parameters of both networks.
        2. It is used to efficiently calculate the outputs of both the actor
          and critic networks on a single input.
  
      Args:
        state: An input state.
        key: A PRNGKey to use to sample an action from the actor's output
          distribution.
        mean_action: If True, it will use the actor's mean action to feed to the
          value network. Otherwise, it will use the sampled action.
  
      Returns:
        A named tuple containing the outputs from both networks.
      """
      actor_output = self.actor(state, key)
  
      if mean_action:
          critic_output = self.critic(state, actor_output.mean_action)
      else:
          critic_output = self.critic(
              state, actor_output.sampled_action
          )
  
      return SacOutput(actor_output, critic_output)
  
imports: import functools
  import operator
  from typing import NamedTuple, Optional, Tuple
  from flax import linen
  import gin
  import jax
  from jax import numpy
  import tensorflow
  from tensorflow_probability.substrates import jax
label_desc: Use image node_id 2 for calling the SACNetwork obj's underlying member method code with example usage: obj.__call__(state, key, mean_action) and returns: SacOutput