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:
@@ -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),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user