class_docstr: A compact implementation of SPR in Jax.
class_docstr_tok: ["A","compact","implementation","of","SPR","in","Jax","."]
code: def _build_networks_and_optimizer(self):
      self._rng, rng = jax.random.split(self._rng)
      self.online_params = self.network_def.init(
          rng,
          x=self.state,
          actions=jnp.zeros((5,)),
          do_rollout=self.spr_weight > 0,
          support=self._support,
      )
      self.optimizer = dqn_agent.create_optimizer(self._optimizer_name)
      self.optimizer_state = self.optimizer.init(self.online_params)
      self.target_network_params = copy.deepcopy(self.online_params)
  
imports: import collections
  import copy
  import functools
  import time
  from absl import logging
  from dopamine.jax import losses
  from dopamine.jax.agents.dqn import dqn_agent
  from dopamine.jax.agents.rainbow import rainbow_agent
  from dopamine.labs.atari_100k import atari_100k_rainbow_agent
  from dopamine.labs.atari_100k.replay_memory import subsequence_replay_buffer
  from dopamine.labs.atari_100k.spr_networks import SPRNetwork
  import gin
  import jax
  import jax.numpy
  import optax
  import tensorflow
label_desc: Use image node_id 2 for calling the SPRAgent obj's underlying member method code with example usage: obj._build_networks_and_optimizer() without return types