(self, train_task, n_eval_batches=1, head_selector=())
Initializes ValueEvalTask.

    Args:
      train_task: ValueTrainTask used to train the policy network.
      n_eval_batches: Number of batches per evaluation.
      head_selector: Layer to apply to the network output to select the value
        head. Only needed in multitask training.
Initializes ValueEvalTask.
Initializes ValueEvalTask .
def __init__(self, train_task, n_eval_batches=1, head_selector=()):
    """Initializes ValueEvalTask.

    Args:
      train_task: ValueTrainTask used to train the policy network.
      n_eval_batches: Number of batches per evaluation.
      head_selector: Layer to apply to the network output to select the value
        head. Only needed in multitask training.
    """
    labeled_data = map(
        train_task.value_batch, train_task.trajectory_batch_stream
    )
    metrics = [tl.L2Loss(), self.l1_loss]
    metric_names = ['value_l2', 'value_l1']
    # Select the appropriate head for evaluation.
    metrics = [tl.Serial(head_selector, metric) for metric in metrics]
    super().__init__(
        labeled_data, metrics,
        sample_batch=train_task.sample_batch,
        metric_names=metric_names,
        n_eval_batches=n_eval_batches,
    )
def __init__ ( self , train_task , n_eval_batches = 1 , head_selector = ( ) ) : labeled_data = map ( train_task . value_batch , train_task . trajectory_batch_stream ) metrics = [ tl . L2Loss ( ) , self . l1_loss ] metric_names = [ 'value_l2' , 'value_l1' ] # Select the appropriate head for evaluation. metrics = [ tl . Serial ( head_selector , metric ) for metric in metrics ] super ( ) . __init__ ( labeled_data , metrics , sample_batch = train_task . sample_batch , metric_names = metric_names , n_eval_batches = n_eval_batches , )