(self)
return tl.Fn('A2CObjectiveMean', f, n_out=1)
A2C objective mean.
A2C objective mean.
A2C objective mean .
def a2c_objective_mean(self):
    """A2C objective mean."""
    def f(dist_inputs, values, returns, dones, rewards,
          actions, old_log_probs, mask):
      """A2C objective mean."""
      # TODO(henrykm): include dones, rewards
      del old_log_probs
      a2c_objective = rl_layers.A2CObjective(
          dist_inputs, values, returns, dones, rewards, actions, mask,
          log_prob_fun=self._policy_dist.log_prob,
          normalize_advantages=self._normalize_advantages)
      return jnp.mean(a2c_objective)
    return tl.Fn('A2CObjectiveMean', f, n_out=1)
def a2c_objective_mean ( self ) : def f ( dist_inputs , values , returns , dones , rewards , actions , old_log_probs , mask ) : """A2C objective mean.""" # TODO(henrykm): include dones, rewards del old_log_probs a2c_objective = rl_layers . A2CObjective ( dist_inputs , values , returns , dones , rewards , actions , mask , log_prob_fun = self . _policy_dist . log_prob , normalize_advantages = self . _normalize_advantages ) return jnp . mean ( a2c_objective ) return tl . Fn ( 'A2CObjectiveMean' , f , n_out = 1 )