Skip to content

Commit d6a466d

Browse files
authored
[BugFix] make value estimator with value_key from the PPOLoss init arg (#1144)
1 parent 71c1657 commit d6a466d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchrl/objectives/ppo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def make_value_estimator(self, value_type: ValueEstimators = None, **hyperparams
263263
if hasattr(self, "gamma"):
264264
hp["gamma"] = self.gamma
265265
hp.update(hyperparams)
266-
value_key = "state_value"
266+
value_key = self.value_key
267267
if value_type == ValueEstimators.TD1:
268268
self._value_estimator = TD1Estimator(
269269
value_network=self.critic, value_key=value_key, **hp

0 commit comments

Comments
 (0)