Skip to content

Commit

Permalink
[Fix] EndOfLifeTransform fix in end of life detection (#1705)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertbou92 authored Nov 19, 2023
1 parent 44bd026 commit 5cac16a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchrl/envs/transforms/gym_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def _step(self, tensordict, next_tensordict):

lives = self._get_lives()
end_of_life = torch.tensor(
tensordict.get(self.lives_key) < lives, device=self.parent.device
tensordict.get(self.lives_key) > lives, device=self.parent.device
)
try:
done = next_tensordict.get(self.done_key)
Expand Down

0 comments on commit 5cac16a

Please sign in to comment.