-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix wav2vec error in Demos/ssl #3872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Liyulingyue
commented
Nov 6, 2024
Liyulingyue
commented
Nov 6, 2024
Liyulingyue
commented
Nov 6, 2024
Liyulingyue
commented
Nov 6, 2024
Liyulingyue
commented
Nov 6, 2024
zxcd
approved these changes
Nov 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
PR types
Bug fixes
PR changes
APIs
Describe
问题描述
调用SSLExecutor执行 wav2asr命令时,会加载asr模型,此时forward函数需要4个输入参数。调用SSLExecutor执行 wav2vec命令时,加载Base模型,forward只需要一个输入参数。
如果Python API先调用wav2asr,再调用wav2vec,SSLExecutor会因为model已存在,从而不会切换模型。提取特征时,wav2vec的代码会调用asr模型的forward函数,进而引发报错。
修改方式
检测SSLExecutor输入是否发生变化,如果输入的参数配置不同,删除model,从而重新加载对应的模型。