(self)
return tl.Fn('PPOObjectiveMean', f)
PPO objective mean.
PPO objective mean.
PPO objective mean .
def ppo_objective_mean(self):
    """PPO objective mean."""
    def f(dist_inputs, values, returns, dones, rewards, actions, old_log_probs):
      """Clipped objective from the PPO algorithm."""
      ppo_objective = rl_layers.PPOObjective(
          dist_inputs, values, returns, dones, rewards, actions, old_log_probs,
          log_prob_fun=self._policy_dist.log_prob,
          epsilon=self._epsilon,
          normalize_advantages=self._normalize_advantages)
      return jnp.mean(ppo_objective)
    return tl.Fn('PPOObjectiveMean', f)
def ppo_objective_mean ( self ) : def f ( dist_inputs , values , returns , dones , rewards , actions , old_log_probs ) : """Clipped objective from the PPO algorithm.""" ppo_objective = rl_layers . PPOObjective ( dist_inputs , values , returns , dones , rewards , actions , old_log_probs , log_prob_fun = self . _policy_dist . log_prob , epsilon = self . _epsilon , normalize_advantages = self . _normalize_advantages ) return jnp . mean ( ppo_objective ) return tl . Fn ( 'PPOObjectiveMean' , f )