(self, task, value_loss_coeff=0.1,
               entropy_coeff=0.01, **kwargs)
Configures the A2C Trainer.
Configures the A2C Trainer.
Configures the A2C Trainer .
def __init__(self, task, value_loss_coeff=0.1,
               entropy_coeff=0.01, **kwargs):
    """Configures the A2C Trainer."""
    self._value_loss_coeff = value_loss_coeff
    self._entropy_coeff = entropy_coeff
    super().__init__(task, **kwargs)
    self._trainer = supervised.Trainer(
        model=self._joint_model,
        optimizer=self._optimizer,
        lr_schedule=self._lr_schedule,
        loss_fn=self.joint_loss,
        inputs=self._inputs,
        output_dir=self._output_dir,
        metrics={'joint_loss': self.joint_loss,
                 'advantage_mean': self.advantage_mean,
                 'advantage_norm': self.advantage_norm,
                 'value_loss': self.value_loss,
                 'explained_variance': self.explained_variance,
                 'log_probs_mean': self.log_probs_mean,
                 'entropy_loss': self.entropy_loss,
                 'a2c_objective_mean': self.a2c_objective_mean,
                 'approximate_kl_divergence': self.approximate_kl_divergence,
                 'preferred_move': self.preferred_move})
def __init__ ( self , task , value_loss_coeff = 0.1 , entropy_coeff = 0.01 , * * kwargs ) : self . _value_loss_coeff = value_loss_coeff self . _entropy_coeff = entropy_coeff super ( ) . __init__ ( task , * * kwargs ) self . _trainer = supervised . Trainer ( model = self . _joint_model , optimizer = self . _optimizer , lr_schedule = self . _lr_schedule , loss_fn = self . joint_loss , inputs = self . _inputs , output_dir = self . _output_dir , metrics = { 'joint_loss' : self . joint_loss , 'advantage_mean' : self . advantage_mean , 'advantage_norm' : self . advantage_norm , 'value_loss' : self . value_loss , 'explained_variance' : self . explained_variance , 'log_probs_mean' : self . log_probs_mean , 'entropy_loss' : self . entropy_loss , 'a2c_objective_mean' : self . a2c_objective_mean , 'approximate_kl_divergence' : self . approximate_kl_divergence , 'preferred_move' : self . preferred_move } )