-
Notifications
You must be signed in to change notification settings - Fork 151
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
How can one add weights for different tags? #47
Comments
Hi, could you please explain a bit more clearly about this? |
The document of
I wonder if this is possible in the CRF loss layer. Thanks. |
I see. The CRF does not offer this, but there might be tricks to do this with the current implementation, depending on how you want to weight the tags. For instance, you may incorporate the weights into the emission scores before feeding them into the CRF layer. You need to work out the maths and check if this can achieve the weighting you want. |
Thanks for @kmkurn 's suggestion. I have three tags, and I want to weight them with [0.11, 1, 0.16]. If I have a logit [a,b,c] from bert output, did you mean that I can feed [0.11 * a, 1 * b, 0.16 * c] as emission score into CRF ? Thanks. |
Hi @allenyummy. It's been a while since my last post. What you wrote seems to be what I had in mind, but you'll need to verify yourself if it achieves what you want. |
No description provided.
The text was updated successfully, but these errors were encountered: