class_docstr: Network for Atari.
docstr: Unrolls more efficiently than dynamic_unroll.
docstr_tok: ["Unrolls","more","efficiently","than","dynamic_unroll","."]
code: def unroll(self, x, state):
      """Unrolls more efficiently than dynamic_unroll."""
      if self._use_resnet:
          torso = AtariDeepTorso()
      else:
          torso = AtariShallowTorso()
  
      torso_output = hk.BatchApply(torso)(x.observation)
      if self._use_lstm:
          should_reset = jnp.equal(
              x.step_type, int(dm_env.StepType.FIRST)
          )
          core_input = (torso_output, should_reset)
          core_output, state = hk.dynamic_unroll(
              self._core, core_input, state
          )
      else:
          core_output = torso_output
          # state passes through.
  
      return hk.BatchApply(self._head)(core_output), state
  
imports: import collections
  import dm_env
  import haiku
  import jax.nn
  import jax.numpy
label_desc: Use image node_id 4 for calling the AtariNet obj's underlying member method code with example usage: obj.unroll(x, state) and returns: hk,  state