We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8559a70 + 8b0e267 commit bd930f9Copy full SHA for bd930f9
octo/utils/gym_wrappers.py
@@ -17,7 +17,7 @@ def stack_and_pad(history: list, num_obs: int):
17
"""
18
horizon = len(history)
19
full_obs = {k: np.stack([dic[k] for dic in history]) for k in history[0]}
20
- pad_length = horizon - max(num_obs, horizon)
+ pad_length = horizon - min(num_obs, horizon)
21
pad_mask = np.ones(horizon)
22
pad_mask[:pad_length] = 0
23
full_obs["pad_mask"] = pad_mask
0 commit comments