Skip to content
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

修复ELMO预训练中bilm_target.py的seg参数缺失问题 #132

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

liu673
Copy link

@liu673 liu673 commented Sep 12, 2024

在预训练ELMO模型时,我发现bilm_target.py中的前向传播和后向传播函数调用缺少了seg参数传递,这导致了预训练过程中的运行时错误:TypeError: LmTarget.lm() missing 1 required positional argument: 'seg'

此PR修复了这个问题,通过在相关函数调用中加入seg参数。这样可以确保在进行前向和后向传播时正确地传递所有必需的参数,从而避免上述类型错误。

具体更改:

  • 在调用self.lm()方法时添加了缺失的seg参数。

测试情况:

  • 已经在我的开发环境中进行了基本的功能测试,预训练过程现在能够正常执行而不再抛出错误。

请审查这些更改,感谢您的时间和努力!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant