Fixed TransformerST bug with ASR masks#2984
Open
ffenix7 wants to merge 7 commits intospeechbrain:developfrom
Open
Fixed TransformerST bug with ASR masks#2984ffenix7 wants to merge 7 commits intospeechbrain:developfrom
ffenix7 wants to merge 7 commits intospeechbrain:developfrom
Conversation
Collaborator
|
Hi @ffenix7 could you fix the tests? Many thanks! Do you think that it could use another function from the TransformerASR.py file instead of this one? |
Author
Hi @TParcollet ! What do you excatly mean by "fix the tests"? Also yes - actually it can use function from the TransformerASR.py file (make_transformer_src_tgt_masks function). I will change it. |
Author
|
Hi @TParcollet ! Can you check the PR? |
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.
What does this PR do?
Fixes #2893
This pull request introduces a new method to the
TransformerSTmodel to handle mask creation for ASR tasks, and updates the code to use this method where appropriate.ASR mask handling improvements:
make_masks_for_asrtoTransformerST.py, which generates the appropriate masks for ASR training, including handling the source padding mask based on training mode and waveform lengths.forward_asrmethod to use the newmake_masks_for_asrmethod instead of the genericmake_masks(that was removed on commit 9ca48f2), ensuring the correct masks are applied for ASR tasks.Before submitting
PR review
Reviewer checklist