Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Oct 2, 2023
1 parent 1bb5745 commit 559d157
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion torchrl/envs/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,9 @@ def __init__(
):
if in_keys is None:
in_keys = IMAGE_KEYS
super(GrayScale, self).__init__(in_keys=in_keys, out_keys=out_keys)
if out_keys is None:
out_keys = copy(in_keys)
super().__init__(in_keys=in_keys, out_keys=out_keys)

def _apply_transform(self, observation: torch.Tensor) -> torch.Tensor:
observation = F.rgb_to_grayscale(observation)
Expand Down

0 comments on commit 559d157

Please sign in to comment.