Rename predict to forward

This is done to be consistent with stable baselines interface. predict is then automatically defined. This is necessary to use stable baselines' evaluate_policy method
This commit is contained in:
Johannes Fischer
2021-10-28 09:42:27 +02:00
parent 71f69c43ed
commit 3857716cec
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ class OptionsEnv(gym.Wrapper):
self.episode_start = True
self.m = available_actions(self.env, self.options)
self.ch, self.value, self.log_prob = generator.policy.predict({
self.ch, self.value, self.log_prob = generator.policy.forward({
'obs': torch.tensor(self.s).unsqueeze(0).to(generator.policy.device),
'mask': torch.tensor(self.m).unsqueeze(0).to(generator.policy.device),
})