Fixing controller data alignment within padded actions tensor.#46
Open
z80 wants to merge 2 commits intoMineDojo:mainfrom
Open
Fixing controller data alignment within padded actions tensor.#46z80 wants to merge 2 commits intoMineDojo:mainfrom
z80 wants to merge 2 commits intoMineDojo:mainfrom
Conversation
Dimensions conversion 21->25->21.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello MineDojo,
I believe, there is a controller data alignment issue in mm_tokenizers.py file. In encode() controller data is aligned left and padded with zeros on the right. But in the decode() the data is assumed to be aligned right as negative indices are used to extract j_right, j_left, and buttons.
When controller inputs are recovered after integrating noise data in get_action()/get_action_with_cfg(), the action tensor last dimension is 25, not 21. Quick and dirty fix is to add one line
prior to extracting j_left, j_right, and buttons.
Thank you!