Fix issue when policy_kwargs=None and TRPL used

This commit is contained in:
Dominik Moritz Roth 2024-01-26 13:01:36 +01:00
parent e788e9f998
commit 9db4e93fa0

View File

@ -116,6 +116,8 @@ class TRPL(BetterOnPolicyAlgorithm):
self.projection_class = castProjection(projection_class)
self.projection_kwargs = projection_kwargs
self.projection = self.projection_class(**self.projection_kwargs)
if policy_kwargs is None:
policy_kwargs = {}
policy_kwargs['policy_projection'] = self.projection
super().__init__(