Skip to content

Commit

Permalink
Merge pull request octo-models#73 from moojink/main
Browse files Browse the repository at this point in the history
Fix pad_mask bug: min instead of max for pad_length
  • Loading branch information
HomerW authored Apr 9, 2024
2 parents 8559a70 + 8b0e267 commit bd930f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion octo/utils/gym_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def stack_and_pad(history: list, num_obs: int):
"""
horizon = len(history)
full_obs = {k: np.stack([dic[k] for dic in history]) for k in history[0]}
pad_length = horizon - max(num_obs, horizon)
pad_length = horizon - min(num_obs, horizon)
pad_mask = np.ones(horizon)
pad_mask[:pad_length] = 0
full_obs["pad_mask"] = pad_mask
Expand Down

0 comments on commit bd930f9

Please sign in to comment.