class_docstr: Core to unroll online and target policies and Q functions at once.
  
  A core that runs online and target policies and Q functions. This can be more
  efficient if the core needs to be unrolled across time and called many times.
class_docstr_tok: ["Core","to","unroll","online","and","target","policies","and","Q","functions","at","once",".","A","core","that","runs","online","and","target","policies","and","Q","functions",".","This","can","be","more","efficient","if","the","core","needs","to","be","unrolled","across","time","and","called","many","times","."]
code: def __init__(
      self,
      online_pi: snt.Module,
      online_q: snt.Module,
      target_pi: snt.Module,
      target_q: snt.Module,
      num_samples: int,
      online_prior: Optional[snt.Module] = None,
      target_prior: Optional[snt.Module] = None,
      name="OnlineTargetPiQ",
  ):
      super().__init__(name)
  
      self._online_pi = online_pi
      self._target_pi = target_pi
      self._online_q = online_q
      self._target_q = target_q
      self._online_prior = online_prior
      self._target_prior = target_prior
  
      self._num_samples = num_samples
      output_list = [
          "online_samples",
          "target_samples",
          "target_log_probs_behavior_actions",
          "online_log_probs",
          "online_q",
          "target_q",
      ]
      if online_prior is not None:
          output_list += [
              "analytic_kl_divergence",
              "analytic_kl_to_target",
          ]
      self._output_tuple = collections.namedtuple(
          "OnlineTargetPiQ", output_list
      )
  
file_path: acme/acme/agents/tf/svg0_prior/utils.py
imports: import collections
  from typing import Tuple, Optional, Dict, Iterable
  from acme import types
  from acme.tf import utils
  import sonnet
  import tensorflow
  import tree
label_desc: Use image node_id 1 to create a new OnlineTargetPiQ object from inherited base classes: snt with example: obj = OnlineTargetPiQ(online_pi, online_q, target_pi, target_q, num_samples, online_prior, target_prior, name)