-
-
Couldn't load subscription status.
- Fork 628
Open
Description
Hi, isn't we need to stack first before invert? By inverting first, I believe the stacked axis is different than expected.
Reinforcement-Learning/Week3/atari_wrappers.py
Lines 160 to 169 in c57064f
| def make_env(env_name, fire=True): | |
| env = gym.make(env_name) | |
| env = MaxAndSkipEnv(env) ## Return only every `skip`-th frame | |
| if fire: | |
| env = FireResetEnv(env) ## Fire at the beginning | |
| env = WarpFrame(env) ## Reshape image | |
| env = ImageToPyTorch(env) ## Invert shape | |
| env = FrameStack(env, 4) ## Stack last 4 frames | |
| env = ScaledFloatFrame(env) ## Scale frames | |
| return env |
The current code would produce input shape of
(1, 84, 336)
If we change to
env = WarpFrame(env) ## Reshape image
env = FrameStack(env, 4) ## Stack last 4 frames
env = ImageToPyTorch(env) ## Invert shape
then we would be able to get shape of
(4, 84, 84)
Metadata
Metadata
Assignees
Labels
No labels