Skip to content

Commit bd930f9

Browse files
authored
Merge pull request #73 from moojink/main
Fix pad_mask bug: min instead of max for pad_length
2 parents 8559a70 + 8b0e267 commit bd930f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

octo/utils/gym_wrappers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def stack_and_pad(history: list, num_obs: int):
1717
"""
1818
horizon = len(history)
1919
full_obs = {k: np.stack([dic[k] for dic in history]) for k in history[0]}
20-
pad_length = horizon - max(num_obs, horizon)
20+
pad_length = horizon - min(num_obs, horizon)
2121
pad_mask = np.ones(horizon)
2222
pad_mask[:pad_length] = 0
2323
full_obs["pad_mask"] = pad_mask

0 commit comments

Comments
 (0)