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: Main call method for building this model in order to generate its variables.
  
  Note: This method should NOT be used by users directly. It's purpose is only to
  perform all forward passes necessary to define all variables of the DreamerV3.
docstr_tok: ["Main","call","method","for","building","this","model","in","order","to","generate","its","variables",".","Note",":","This","method","should","NOT","be","used","by","users","directly",".","It","'s","purpose","is","only","to","perform","all","forward","passes","necessary","to","define","all","variables","of","the","DreamerV3","."]
code: def call(
      self,
      inputs,
      observations,
      actions,
      is_first,
      start_is_terminated_BxT,
  ):
      """Main call method for building this model in order to generate its variables.
  
      Note: This method should NOT be used by users directly. It's purpose is only to
      perform all forward passes necessary to define all variables of the DreamerV3.
      """
  
      # Forward passes through all models are enough to build all trainable and
      # non-trainable variables:
  
      # World model.
      results = self.world_model.forward_train(
          observations,
          actions,
          is_first,
      )
      # Actor.
      _, distr_params = self.actor(
          h=results["h_states_BxT"],
          z=results["z_posterior_states_BxT"],
      )
      # Critic.
      values, _ = self.critic(
          h=results["h_states_BxT"],
          z=results["z_posterior_states_BxT"],
          use_ema=tf.convert_to_tensor(False),
      )
  
      # Dream pipeline.
      dream_data = self.dream_trajectory(
          start_states={
              "h": results["h_states_BxT"],
              "z": results["z_posterior_states_BxT"],
          },
          start_is_terminated=start_is_terminated_BxT,
      )
  
      return {
          "world_model_fwd": results,
          "dream_data": dream_data,
          "actions": actions,
          "values": values,
      }
  
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 2 for calling the DreamerModel obj's underlying member method code with example usage: obj.call(inputs, observations, actions, is_first, start_is_terminated_BxT) and returns: dict