Fix Bug: Let's let thge pca-lib handle this exception

This commit is contained in:
Dominik Moritz Roth 2023-05-21 17:19:39 +02:00
parent c473990fbd
commit 69fdd7b103

View File

@ -299,7 +299,6 @@ class ActorCriticPolicy(BasePolicy):
values = self.value_net(latent_vf)
distribution = self._get_action_dist_from_latent(latent_pi)
if self.use_pca:
assert trajectory != None, 'Past trajectory has to be provided when using PCA.'
actions = distribution.get_actions(deterministic=deterministic, trajectory=trajectory)
else:
actions = distribution.get_actions(deterministic=deterministic)