class_docstr: PyTorch policy class used with SimpleQ.
code: def compute_actions(
      self,
      *,
      input_dict,
      explore=True,
      timestep=None,
      episodes=None,
      is_training=False,
      **kwargs,
  ) -> Tuple[
      TensorStructType, List[TensorType], Dict[str, TensorStructType]
  ]:
      if timestep is None:
          timestep = self.global_timestep
      # Compute the Q-values for each possible action, using our Q-value network.
      q_vals = self._compute_q_values(
          self.model,
          input_dict[SampleBatch.OBS],
          is_training=is_training,
      )
      # Use a Categorical distribution for the exploration component.
      # This way, it may either sample storchastically (e.g. when using SoftQ)
      # or deterministically/greedily (e.g. when using EpsilonGreedy).
      distribution = TorchCategorical(q_vals, self.model)
      # Call the exploration component's `get_exploration_action` method to
      # explore, if necessary.
      actions, logp = self.exploration.get_exploration_action(
          action_distribution=distribution,
          timestep=timestep,
          explore=explore,
      )
      # Return (exploration) actions, state_outs (empty list), and extra outs.
      return (
          actions,
          [],
          {
              "q_values": q_vals,
              SampleBatch.ACTION_LOGP: logp,
              SampleBatch.ACTION_PROB: torch.exp(logp),
              SampleBatch.ACTION_DIST_INPUTS: q_vals,
          },
      )
  
imports: import logging
  from typing import Any, Dict, List, Tuple, Type, Union
  from ray.rllib.algorithms.simple_q.utils import make_q_models
  from ray.rllib.models.modelv2 import ModelV2
  from ray.rllib.models.torch.torch_action_dist import TorchCategorical, TorchDistributionWrapper
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.policy.torch_mixins import TargetNetworkMixin, LearningRateSchedule
  from ray.rllib.policy.torch_policy_v2 import TorchPolicyV2
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.framework import try_import_torch
  from ray.rllib.utils.metrics.learner_info import LEARNER_STATS_KEY
  from ray.rllib.utils.numpy import convert_to_numpy
  from ray.rllib.utils.torch_utils import concat_multi_gpu_td_errors, huber_loss
  from ray.rllib.utils.typing import TensorStructType, TensorType
label_desc: Use image node_id 3 for calling the SimpleQTorchPolicy obj's underlying member method code with example usage: obj.compute_actions() and returns: actions,  list,  dict