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

@@ -22,7 +22,7 @@ class OptionsCnnPolicy(stable_baselines3.common.policies.ActorCriticCnnPolicy):
values = self.value_net(latent_vf)
return values, distribution.distribution
def predict(self, obs, eps=1e-6):
def forward(self, obs, eps=1e-6):
"""
Will mask invalid states before making action selections
Args: