class_docstr: Base class for value-based policies.
  
  Args:
      device (string): Device name
          (<span style="color:#00C000"><b>default</b></span>: inherit value of parent module).
      l2_regularization (float >= 0.0): Scalar controlling L2 regularization
          (<span style="color:#00C000"><b>default</b></span>: inherit value of parent module).
      name (string): <span style="color:#0000C0"><b>internal use</b></span>.
      states_spec (specification): <span style="color:#0000C0"><b>internal use</b></span>.
      auxiliaries_spec (specification): <span style="color:#0000C0"><b>internal use</b></span>.
      actions_spec (specification): <span style="color:#0000C0"><b>internal use</b></span>.
class_docstr_tok: ["Base","class","for","value-based","policies",".","Args",":","device","(","string",")",":","Device","name","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","inherit","value","of","parent","module",")",".","l2_regularization","(","float",">","=","0.0",")",":","Scalar","controlling","L2","regularization","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","inherit","value","of","parent","module",")",".","name","(","string",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","states_spec","(","specification",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","auxiliaries_spec","(","specification",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">",".","actions_spec","(","specification",")",":","<","span","style=","''","color",":","#","0000C0","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">","."]
code: def action_value(
      self, *, states, horizons, internals, auxiliaries, actions
  ):
      action_values = self.action_values(
          states=states,
          horizons=horizons,
          internals=internals,
          auxiliaries=auxiliaries,
          actions=actions,
      )
  
      def function(value, spec):
          return tf.reshape(tensor=value, shape=(-1, spec.size))
  
      action_values = action_values.fmap(
          function=function, zip_values=self.actions_spec
      )
      action_values = tf.concat(
          values=tuple(action_values.values()), axis=1
      )
  
      return tf.math.reduce_mean(input_tensor=action_values, axis=1)
  
file_path: tensorforce/tensorforce/core/policies/value_policy.py
imports: import tensorflow
  from tensorforce.core import SignatureDict, TensorSpec, tf_function
  from tensorforce.core.policies import ActionValue, Policy, StateValue
label_desc: Use image node_id 4 for calling the ValuePolicy obj's underlying member method code with example usage: obj.action_value() and returns: tf, tf