(self, env)
| 169 | |
| 170 | class GrayScaleObservation(gym.ObservationWrapper): |
| 171 | def __init__(self, env): |
| 172 | super().__init__(env) |
| 173 | obs_shape = self.observation_space.shape[:2] |
| 174 | self.observation_space = Box(low=0, high=255, shape=obs_shape, dtype=np.uint8) |
| 175 | |
| 176 | def permute_orientation(self, observation): |
| 177 | # permute [H, W, C] array to [C, H, W] tensor |