code: def __init__(
      self,
      agent_parameters: AgentParameters,
      spaces: SpacesDefinition,
      network_name: str,
      head_idx: int = 0,
      loss_weight: float = 1.0,
      is_local: bool = True,
      activation_function: str = "tanh",
      dense_layer=Dense,
  ):
      super().__init__(
          agent_parameters,
          spaces,
          network_name,
          head_idx,
          loss_weight,
          is_local,
          activation_function,
          dense_layer=dense_layer,
      )
      self.name = "policy_values_head"
      self.return_type = ActionProbabilities
      self.beta = None
      self.action_penalty = None
  
      self.exploration_policy = agent_parameters.exploration
  
      # a scalar weight that penalizes low entropy values to encourage exploration
      if hasattr(agent_parameters.algorithm, "beta_entropy"):
          # we set the beta value as a tf variable so it can be updated later if needed
          self.beta = tf.Variable(
              float(agent_parameters.algorithm.beta_entropy),
              trainable=False,
              collections=[tf.GraphKeys.LOCAL_VARIABLES],
          )
          self.beta_placeholder = tf.placeholder("float")
          self.set_beta = tf.assign(self.beta, self.beta_placeholder)
  
      # a scalar weight that penalizes high activation values (before the activation function) for the final layer
      if hasattr(agent_parameters.algorithm, "action_penalty"):
          self.action_penalty = (
              agent_parameters.algorithm.action_penalty
          )
  
file_path: coach/rl_coach/architectures/tensorflow_components/heads/policy_head.py
imports: import numpy
  import tensorflow
  from rl_coach.architectures.tensorflow_components.layers import Dense
  from rl_coach.architectures.tensorflow_components.heads.head import Head, normalized_columns_initializer
  from rl_coach.base_parameters import AgentParameters
  from rl_coach.core_types import ActionProbabilities
  from rl_coach.exploration_policies.continuous_entropy import ContinuousEntropyParameters
  from rl_coach.spaces import DiscreteActionSpace, BoxActionSpace, CompoundActionSpace
  from rl_coach.spaces import SpacesDefinition
  from rl_coach.utils import eps, indent_string
label_desc: Use image node_id 1 to create a new PolicyHead object from inherited base classes: Head with example: obj = PolicyHead(agent_parameters, spaces, network_name, head_idx, loss_weight, is_local, activation_function, dense_layer)