class_docstr: Trains a joint policy-and-value model using actor-critic methods.
class_docstr_tok: ["Trains","a","joint","policy-and-value","model","using","actor-critic","methods","."]
docstr: Value loss - so far generic for all A2C.
docstr_tok: ["Value","loss","-","so","far","generic","for","all","A2C","."]
code: def value_loss(self):
      """Value loss - so far generic for all A2C."""
  
      def f(dist_inputs, values, returns):
          del dist_inputs
          return rl_layers.ValueLoss(
              values, returns, self._value_loss_coeff
          )
  
      return tl.Fn("ValueLoss", f)
  
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 ActorCriticJointAgent obj's underlying member method code with example usage: obj.value_loss() and returns: tl, rl_layers