We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
您好,能请教一个问题吗?我在运行python ptbert.py的时候报了上面的错,显示错误在pooled_output = self.dropout(pooled_output)这一行,打印出pooled_output是'pooler_output'这个东西,是个str不是tensor,这就很奇怪了,_, pooled_output = self.bert(input_ids, None, input_mask),为什么bert出来的pooled_output就是'pooler_output'呢?我不知道是哪里错了,还望能指点下吗?非常感谢大佬!
The text was updated successfully, but these errors were encountered:
新版transformers BertModel默认返回BaseModelOutputWithPoolingAndCrossAttentions了,改成 pooled_output = self.bert(input_ids, attention_mask=input_mask).pooler_output就好了
Sorry, something went wrong.
No branches or pull requests
您好,能请教一个问题吗?我在运行python ptbert.py的时候报了上面的错,显示错误在pooled_output = self.dropout(pooled_output)这一行,打印出pooled_output是'pooler_output'这个东西,是个str不是tensor,这就很奇怪了,_, pooled_output = self.bert(input_ids, None, input_mask),为什么bert出来的pooled_output就是'pooler_output'呢?我不知道是哪里错了,还望能指点下吗?非常感谢大佬!
The text was updated successfully, but these errors were encountered: