def test_policy(self): event_trigger.set_train(True) self.model.policy_learning = PolicyGradient(input_dim=3 * self.layer_dim) mle_loss = MLELoss() loss = mle_loss.calc_loss(self.model, self.src[0], self.trg[0]) event_trigger.calc_additional_loss(self.trg[0], self.model, loss)
def test_train_nll(self): event_trigger.set_train(True) mle_loss = MLELoss() mle_loss.calc_loss(self.model, self.src[0], self.trg[0])