class_docstr: Each sub-step or actor gets its individual critic.
  Can be instantiated via the
  :class:`~maze.perception.models.critics.step_state_critic_composer.StepStateCriticComposer`.
class_docstr_tok: ["Each","sub-step","or","actor","gets","its","individual","critic",".","Can","be","instantiated","via","the",":","class",":","`","~maze.perception.models.critics.step_state_critic_composer.StepStateCriticComposer","`","."]
docstr: implementation of :class:`~maze.core.agent.torch_state_critic.TorchStateCritic`
          
docstr_tok: ["implementation","of",":","class",":","`","~maze.core.agent.torch_state_critic.TorchStateCritic","`"]
code: def predict_values(
      self, critic_input: StateCriticInput
  ) -> StateCriticOutput:
      """implementation of :class:`~maze.core.agent.torch_state_critic.TorchStateCritic`"""
      critic_output = StateCriticOutput()
      for critic_step_input in critic_input:
          value = self.networks[critic_step_input.actor_id.step_key](
              critic_step_input.tensor_dict
          )["value"][..., 0]
          critic_output.append(
              StateCriticStepOutput(
                  values=value,
                  detached_values=value.detach(),
                  actor_id=critic_step_input.actor_id,
              )
          )
  
      return critic_output
  
imports: from abc import abstractmethod
  from typing import Mapping, Union, List, Dict
  import torch
  from gym import spaces
  from torch import nn
  from maze.core.agent.state_critic import StateCritic
  from maze.core.agent.state_critic_input_output import StateCriticStepOutput, StateCriticOutput, StateCriticInput
  from maze.core.agent.torch_model import TorchModel
  from maze.core.annotations import override
  from maze.core.env.observation_conversion import ObservationType
  from maze.core.env.structured_env import StepKeyType
  from maze.perception.perception_utils import convert_to_torch, flatten_spaces, stack_and_flatten_spaces
label_desc: Use image node_id 1 for calling the TorchStepStateCritic obj's underlying member method code with example usage: obj.predict_values(critic_input) and returns: critic_output