code: def _build_continuous_net(self, input_layer, action_space):
      num_actions = action_space.shape[0]
  
      self.policy_mu_and_logsig = self.dense_layer(2 * num_actions)(
          input_layer, name="policy_mu_logsig"
      )
      self.policy_mean = tf.identity(
          self.policy_mu_and_logsig[..., :num_actions],
          name="policy_mean",
      )
      self.policy_log_std = tf.clip_by_value(
          self.policy_mu_and_logsig[..., num_actions:],
          LOG_SIG_CAP_MIN,
          LOG_SIG_CAP_MAX,
          name="policy_log_std",
      )
  
      self.output.append(self.policy_mean)  # output[0]
      self.output.append(self.policy_log_std)  # output[1]
  
      # define the distributions for the policy
      # Tensorflow's multivariate normal distribution supports reparameterization
      tfd = tf.contrib.distributions
      self.policy_distribution = tfd.MultivariateNormalDiag(
          loc=self.policy_mean, scale_diag=tf.exp(self.policy_log_std)
      )
  
      # define network outputs
      # note that tensorflow supports reparametrization.
      # i.e. policy_action_sample is a tensor through which gradients can flow
      self.raw_actions = self.policy_distribution.sample()
  
      if self.squash:
          self.actions = tf.tanh(self.raw_actions)
          # correct log_prob in case of squash (see appendix C in the paper)
          squash_correction = self._squash_correction(self.raw_actions)
      else:
          self.actions = self.raw_actions
          squash_correction = 0
  
      # policy_action_logprob is a tensor through which gradients can flow
      self.sampled_actions_logprob = (
          self.policy_distribution.log_prob(self.raw_actions)
          - squash_correction
      )
      self.sampled_actions_logprob_mean = tf.reduce_mean(
          self.sampled_actions_logprob
      )
  
      self.output.append(
          self.raw_actions
      )  # output[2] : sampled raw action (before squash)
      self.output.append(
          self.actions
      )  # output[3] : squashed (if needed) version of sampled raw_actions
      self.output.append(
          self.sampled_actions_logprob
      )  # output[4]: log prob of sampled action (squash corrected)
      self.output.append(self.sampled_actions_logprob_mean)
  
file_path: coach/rl_coach/architectures/tensorflow_components/heads/sac_head.py
imports: import tensorflow
  from rl_coach.architectures.tensorflow_components.layers import Dense
  from rl_coach.architectures.tensorflow_components.heads.head import Head
  from rl_coach.base_parameters import AgentParameters
  from rl_coach.core_types import ActionProbabilities
  from rl_coach.spaces import SpacesDefinition
  from rl_coach.utils import eps
label_desc: Use image node_id 4 for calling the SACPolicyHead obj's underlying member method code with example usage: obj._build_continuous_net(input_layer, action_space) without return types