class_docstr: The A2C algorithm.
  
  Trains policy and value models using the A2C algortithm.
class_docstr_tok: ["The","A2C","algorithm",".","Trains","policy","and","value","models","using","the","A2C","algortithm","."]
docstr: A2C objective mean.
docstr_tok: ["A2C","objective","mean","."]
code: 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)
  
imports: import functools
  from trax import data
  from trax import layers
  from trax import supervised
  from trax.fastmath import numpy
  from trax.fastmath import stop_gradient
  from trax.rl import actor_critic
  from trax.rl import distributions
  from trax.rl import rl_layers
  from trax.rl import training
  from trax.supervised import lr_schedules
label_desc: Use image node_id 7 for calling the A2CJoint obj's underlying member method code with example usage: obj.a2c_objective_mean() and returns: tl, jnp