Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/openpi/policies/droid_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ def __call__(self, data: dict) -> dict:
class DroidOutputs(transforms.DataTransformFn):
def __call__(self, data: dict) -> dict:
# Only return the first 8 dims.
return {"actions": np.asarray(data["actions"][:, :8])}
return {"actions": np.asarray(data["actions"][..., :8])}
2 changes: 1 addition & 1 deletion src/openpi/policies/libero_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ def __call__(self, data: dict) -> dict:
# dimension, we need to now parse out the correct number of actions in the return dict.
# For Libero, we only return the first 7 actions (since the rest is padding).
# For your own dataset, replace `7` with the action dimension of your dataset.
return {"actions": np.asarray(data["actions"][:, :7])}
return {"actions": np.asarray(data["actions"][..., :7])}
Loading