尝试使用Electra而不是BERT模型运行NLP模型
我想运行 wl-coref 带有电气模型的模型而不是bert模型。但是,我通过Electra模型收到一条错误消息,并且找不到有关如何修复它的HuggingFace文档中的提示。
我尝试了不同的BERT模型,例如Roberta-Base,Bert-Base-German cassed或Spanbert/Spanbert-Base Cashed。所有工作。 但是,如果我尝试使用Electra模型,例如Google/Electra-Base-Discisiminator或Derman-NLP组/元基层 - 基德 - 荷兰语,则不起作用。
显示的错误:
out, _ = self.bert(subwords_batches_tensor, attention_mask=torch.tensor(attention_mask, device=self.config.device))
ValueError: not enough values to unpack (expected 2, got 1)
这是错误来自: _ bertify 在第349行中。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需删除下划线 bert or 或 roberta :
_
。 electra electra 不像输出:
Just remove the underscore
_
. ELECTRA does not return a pooling output like BERT or RoBerta:Output: