class_docstr: First sub step gets a regular critic, subsequent sub-steps predict a delta w.r.t. to the previous critic.
  
  Instantiates a
  :class:`~maze.core.agent.torch_state_critic.TorchDeltaStateCritic`.
  
  :param observation_spaces_dict: Dict of sub-step id to observation space.
  :param networks: The single, shared critic network as defined in the config.
class_docstr_tok: ["First","sub","step","gets","a","regular","critic",",","subsequent","sub-steps","predict","a","delta","w.r.t",".","to","the","previous","critic",".","Instantiates","a",":","class",":","`","~maze.core.agent.torch_state_critic.TorchDeltaStateCritic","`",".",":","param","observation_spaces_dict",":","Dict","of","sub-step","id","to","observation","space",".",":","param","networks",":","The","single",",","shared","critic","network","as","defined","in","the","config","."]
code: def __init__(
      self,
      observation_spaces_dict: Dict[Union[str, int], spaces.Dict],
      agent_counts_dict: Dict[StepKeyType, int],
      networks: CollectionOfConfigType,
  ):
      super().__init__(observation_spaces_dict, agent_counts_dict)
  
      # initialize critic
      model_registry = Factory(base_type=nn.Module)
      networks = list_to_dict(networks)
      self._critics = dict()
      for idx, (key, net_config) in enumerate(networks.items()):
          step_obs_shapes = self._obs_shapes[key]
          if idx > 0:
              step_obs_shapes = {
                  **step_obs_shapes,
                  self.prev_value_key: self.prev_value_shape,
              }
          self._critics[key] = model_registry.instantiate(
              networks[key], obs_shapes=step_obs_shapes
          )
  
file_path: maze/maze/perception/models/critics/delta_state_critic_composer.py
imports: from typing import Dict, Union
  import numpy
  from gym import spaces
  from torch import nn
  from maze.core.agent.torch_state_critic import TorchDeltaStateCritic
  from maze.core.annotations import override
  from maze.core.env.structured_env import StepKeyType
  from maze.core.utils.config_utils import list_to_dict
  from maze.core.utils.factory import CollectionOfConfigType, Factory
  from maze.perception.models.critics.base_state_critic_composer import BaseStateCriticComposer
label_desc: Use image node_id 1 to create a new DeltaStateCriticComposer object from inherited base classes: BaseStateCriticComposer with example: obj = DeltaStateCriticComposer(observation_spaces_dict, agent_counts_dict, networks)