class_docstr: The main tf-keras model containing all necessary components for DreamerV3.
  
  Includes:
  - The world model with encoder, decoder, sequence-model (RSSM), dynamics
  (generates prior z-state), and "posterior" model (generates posterior z-state).
  Predicts env dynamics and produces dreamed trajectories for actor- and critic
  learning.
  - The actor network (policy).
  - The critic network for value function prediction.
class_docstr_tok: ["The","main","tf-keras","model","containing","all","necessary","components","for","DreamerV3",".","Includes",":","-","The","world","model","with","encoder",",","decoder",",","sequence-model","(","RSSM",")",",","dynamics","(","generates","prior","z-state",")",",","and","``","posterior","''","model","(","generates","posterior","z-state",")",".","Predicts","env","dynamics","and","produces","dreamed","trajectories","for","actor-","and","critic","learning",".","-","The","actor","network","(","policy",")",".","-","The","critic","network","for","value","function","prediction","."]
docstr: Returns the (current) initial state of the dreamer model (a, h-, z-states).
  
  An initial state is generated using the previous action, the tanh of the
  (learned) h-state variable and the dynamics predictor (or "prior net") to
  compute z^0 from h0. In this last step, it is important that we do NOT sample
  the z^-state (as we would usually do during dreaming), but rather take the mode
  (argmax, then one-hot again).
docstr_tok: ["Returns","the","(","current",")","initial","state","of","the","dreamer","model","(","a",",","h-",",","z-states",")",".","An","initial","state","is","generated","using","the","previous","action",",","the","tanh","of","the","(","learned",")","h-state","variable","and","the","dynamics","predictor","(","or","``","prior","net","''",")","to","compute","z^0","from","h0",".","In","this","last","step",",","it","is","important","that","we","do","NOT","sample","the","z^-state","(","as","we","would","usually","do","during","dreaming",")",",","but","rather","take","the","mode","(","argmax",",","then","one-hot","again",")","."]
code: def get_initial_state(self):
      """Returns the (current) initial state of the dreamer model (a, h-, z-states).
  
      An initial state is generated using the previous action, the tanh of the
      (learned) h-state variable and the dynamics predictor (or "prior net") to
      compute z^0 from h0. In this last step, it is important that we do NOT sample
      the z^-state (as we would usually do during dreaming), but rather take the mode
      (argmax, then one-hot again).
      """
      states = self.world_model.get_initial_state()
  
      action_dim = (
          self.action_space.n
          if isinstance(self.action_space, gym.spaces.Discrete)
          else np.prod(self.action_space.shape)
      )
      states["a"] = tf.zeros(
          (
              1,
              action_dim,
          ),
          dtype=tf.keras.mixed_precision.global_policy().compute_dtype
          or tf.float32,
      )
      return states
  
file_path: ray/rllib/algorithms/dreamerv3/tf/models/dreamer_model.py
imports: import re
  import gymnasium
  import numpy
  from ray.rllib.algorithms.dreamerv3.tf.models.disagree_networks import DisagreeNetworks
  from ray.rllib.algorithms.dreamerv3.tf.models.actor_network import ActorNetwork
  from ray.rllib.algorithms.dreamerv3.tf.models.critic_network import CriticNetwork
  from ray.rllib.algorithms.dreamerv3.tf.models.world_model import WorldModel
  from ray.rllib.algorithms.dreamerv3.utils import get_gru_units, get_num_z_categoricals, get_num_z_classes
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.tf_utils import inverse_symlog
label_desc: Use image node_id 6 for calling the DreamerModel obj's underlying member method code with example usage: obj.get_initial_state() and returns: states