class_docstr: A duelling recurrent network for use with Atari observations as seen in R2D2.
  
  See https://openreview.net/forum?id=r1lyTjAqYX for more information.
docstr: Efficient unroll that applies torso, core, and duelling mlp in one pass.
docstr_tok: ["Efficient","unroll","that","applies","torso",",","core",",","and","duelling","mlp","in","one","pass","."]
code: def unroll(
      self,
      inputs: observation_action_reward.OAR,  # [T, B, ...]
      state: hk.LSTMState,  # [T, ...]
  ) -> Tuple[base.QValues, hk.LSTMState]:
      """Efficient unroll that applies torso, core, and duelling mlp in one pass."""
      embeddings = hk.BatchApply(self._embed)(inputs)  # [T, B, D+A+1]
      core_outputs, new_states = hk.static_unroll(
          self._core, embeddings, state
      )
      q_values = hk.BatchApply(self._duelling_head)(
          core_outputs
      )  # [T, B, A]
      return q_values, new_states
  
imports: from typing import Any, Optional, Sequence, Tuple
  from acme.jax.networks import base
  from acme.jax.networks import duelling
  from acme.jax.networks import embedding
  from acme.jax.networks import policy_value
  from acme.jax.networks import resnet
  from acme.wrappers import observation_action_reward
  import haiku
  import jax
  import jax.numpy
label_desc: Use image node_id 4 for calling the R2D2AtariNetwork obj's underlying member method code with example usage: obj.unroll(inputs, state) and returns: q_values,  new_states