Fix: Exception when trying to use PCA

This commit is contained in:
Dominik Moritz Roth 2023-08-21 23:49:19 +02:00
parent 9a4c43e233
commit c9ca5c0b53

View File

@ -580,6 +580,10 @@ class ActorCriticPolicy(BasePolicy):
self.action_net, self.log_std = self.action_dist.proba_distribution_net(
latent_dim=latent_dim_pi, latent_sde_dim=latent_dim_pi, log_std_init=self.log_std_init
)
elif isinstance(self.action_dist, PCA_Distribution):
self.action_net, self.log_std = self.action_dist.proba_distribution_net(
latent_dim=latent_dim_pi
)
elif isinstance(self.action_dist, (CategoricalDistribution, MultiCategoricalDistribution, BernoulliDistribution)):
self.action_net = self.action_dist.proba_distribution_net(latent_dim=latent_dim_pi)
else: