Fix: drop n_envs for DIstributions that dont need to know

This commit is contained in:
Dominik Moritz Roth 2024-03-09 13:55:04 +01:00
parent 66b8d21398
commit e14aae90ac

View File

@ -530,7 +530,7 @@ class ActorCriticPolicy(BasePolicy):
self.n_envs = dist_kwargs.pop('n_envs', 1) self.n_envs = dist_kwargs.pop('n_envs', 1)
# Action distribution # Action distribution
self.action_dist = make_proba_distribution(action_space, self.n_envs, use_sde=use_sde, use_pca=use_pca, dist_kwargs=dist_kwargs) self.action_dist = make_proba_distribution(action_space, self.n_envs, use_sde=use_sde, use_pca=use_pca, n_envs=self.n_envs, dist_kwargs=dist_kwargs)
self._build(lr_schedule) self._build(lr_schedule)