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: Explained variance metric.
docstr_tok: ["Explained","variance","metric","."]
code: def explained_variance(self):
      """Explained variance metric."""
  
      def f(dist_inputs, values, returns):
          del dist_inputs
          return rl_layers.ExplainedVariance(values, returns)
  
      return tl.Fn("ExplainedVariance", 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 8 for calling the ActorCriticJointAgent obj's underlying member method code with example usage: obj.explained_variance() and returns: tl, rl_layers