mirror of
https://github.com/gryf/coach.git
synced 2025-12-17 19:20:19 +01:00
bug fix for dumping gifs from doom
This commit is contained in:
@@ -146,6 +146,11 @@ class DoomEnvironmentWrapper(EnvironmentWrapper):
|
|||||||
def _preprocess_observation(self, observation):
|
def _preprocess_observation(self, observation):
|
||||||
if observation is None:
|
if observation is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
# for the last step we get no new observation, so we shouldn't preprocess it
|
||||||
|
if self.done:
|
||||||
|
return observation
|
||||||
|
|
||||||
# move the channel to the last axis
|
# move the channel to the last axis
|
||||||
observation = np.transpose(observation, (1, 2, 0))
|
observation = np.transpose(observation, (1, 2, 0))
|
||||||
return observation
|
return observation
|
||||||
|
|||||||
Reference in New Issue
Block a user