class_docstr: A stateless agent interface.
class_docstr_tok: ["A","stateless","agent","interface","."]
docstr: Initializes the agent params given the RNG key.
docstr_tok: ["Initializes","the","agent","params","given","the","RNG","key","."]
code: def initial_params(self, rng_key):
      """Initializes the agent params given the RNG key."""
      dummy_inputs = jax.tree_util.tree_map(
          lambda t: np.zeros(t.shape, t.dtype), self._obs_spec
      )
      dummy_inputs = util.preprocess_step(dm_env.restart(dummy_inputs))
      dummy_inputs = jax.tree_util.tree_map(
          lambda t: t[None, None, ...], dummy_inputs
      )
      return self._init_fn(rng_key, dummy_inputs, self.initial_state(1))
  
file_path: dm-haiku/examples/impala/agent.py
imports: import collections
  import functools
  from typing import Any, Callable, Optional
  import dm_env
  import haiku
  from examples.impala import util
  import jax
  import jax.numpy
  import numpy
label_desc: Use image node_id 2 for calling the Agent obj's underlying member method code with example usage: obj.initial_params(rng_key) and returns: self