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

老哥,有个问题请教一下 #26

Open
tankland opened this issue May 21, 2021 · 1 comment
Open

老哥,有个问题请教一下 #26

tankland opened this issue May 21, 2021 · 1 comment

Comments

@tankland
Copy link

我参考你的思路,但是最后采用sigmoid的bce loss来优化模型,目的是为了预测同一个span属于多标签分类的问题,但是模型一直不收敛,可能的原因是什么呢

@juntaoy
Copy link
Owner

juntaoy commented May 21, 2021

这个我就不是很清楚了,按理说改成bce 应该没有任何问题的。你有把
candidate_ner_scores = util.bilinear_classifier(candidate_starts_emb,candidate_ends_emb,self.dropout,output_size=self.num_types+1)#[num_sentence, max_sentence_length,max_sentence_length,types+1] candidate_ner_scores = tf.boolean_mask(tf.reshape(candidate_ner_scores,[-1,self.num_types+1]),flattened_candidate_scores_mask)<br class="Apple-interchange-newline">
里面的self.num_types+1 改成self.num_types吗? 这里应该你对每一个label做出单独的判断就不需要一个non_mention score了

另外你可以尝试一下给negative example 一点reduced weight这样可以缓解imbalance的问题

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

No branches or pull requests

2 participants