class_docstr: A SAC Agent.
class_docstr_tok: ["A","SAC","Agent","."]
code: def _actor_loss_debug_summaries(
      self, actor_loss, actions, log_pi, target_q_values, time_steps
  ):
      if self._debug_summaries:
          common.generate_tensor_summaries(
              "actor_loss", actor_loss, self.train_step_counter
          )
          try:
              for name, action in nest_utils.flatten_with_joined_paths(
                  actions
              ):
                  common.generate_tensor_summaries(
                      name, action, self.train_step_counter
                  )
          except ValueError:
              pass  # Guard against internal SAC variants that do not directly
              # generate actions.
  
          common.generate_tensor_summaries(
              "log_pi", log_pi, self.train_step_counter
          )
          tf.compat.v2.summary.scalar(
              name="entropy_avg",
              data=-tf.reduce_mean(input_tensor=log_pi),
              step=self.train_step_counter,
          )
          common.generate_tensor_summaries(
              "target_q_values",
              target_q_values,
              self.train_step_counter,
          )
          batch_size = nest_utils.get_outer_shape(
              time_steps, self._time_step_spec
          )[0]
          policy_state = self._train_policy.get_initial_state(
              batch_size
          )
          action_distribution = self._train_policy.distribution(
              time_steps, policy_state
          ).action
          if isinstance(action_distribution, tfp.distributions.Normal):
              common.generate_tensor_summaries(
                  "act_mean",
                  action_distribution.loc,
                  self.train_step_counter,
              )
              common.generate_tensor_summaries(
                  "act_stddev",
                  action_distribution.scale,
                  self.train_step_counter,
              )
          elif isinstance(
              action_distribution, tfp.distributions.Categorical
          ):
              common.generate_tensor_summaries(
                  "act_mode",
                  action_distribution.mode(),
                  self.train_step_counter,
              )
          try:
              for (
                  name,
                  action_dist,
              ) in nest_utils.flatten_with_joined_paths(
                  action_distribution
              ):
                  common.generate_tensor_summaries(
                      "entropy_" + name,
                      action_dist.entropy(),
                      self.train_step_counter,
                  )
          except NotImplementedError:
              pass
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from typing import Callable, Optional, Text
  import gin
  import numpy
  from six.moves import zip
  import tensorflow
  import tensorflow_probability
  from tf_agents.agents import data_converter
  from tf_agents.agents import tf_agent
  from tf_agents.networks import network
  from tf_agents.policies import actor_policy
  from tf_agents.policies import tf_policy
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import eager_utils
  from tf_agents.utils import nest_utils
  from tf_agents.utils import object_identity
label_desc: Use image node_id 15 for calling the SacAgent obj's underlying member method code with example usage: obj._actor_loss_debug_summaries(actor_loss, actions, log_pi, target_q_values, time_steps) without return types