-
Notifications
You must be signed in to change notification settings - Fork 308
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 to select relation in Attention while Testing? #17
Comments
While testing, you need to calculate all P(r|s) and just use the query vector with relation r' when calculating P(r'|s). |
@Mrlyk423 |
Yes |
@Mrlyk423 |
@Mrlyk423 but in test phase how to calculate alpha(instance attention), and how to choose the y_pred, max(p(r|s))? |
@Mrlyk423 Sorry for another question. In the test and evaluation code, why do you only calculate the the top 2000 high probability items.
It seems that it cannot cover all the test data? |
For relation extraction, we only focus on the top predict results. If you want to get the all predict results, just change 2000 to the number you need. |
@Mrlyk423 Thanks very much. By the way, do you have other versions of PCNN+ATT such as tensorflow or pytorch? I try to reproduce PCNN+ATT with pytorch but got a quite worse result comparing with your C++ version. But the pytorch version of PCNN+ONE got a similar result as yours and Zeng2015. This issue confused me for a long time, What may be the possible reason? |
Is vector r in equation (8) obtained from Matrix M mentioned in equation (10)? Or there are two separate trainable parameters for r in eq (8) and M in eq (10)? |
In my opinion, the vector r in equation (8) shares with Matrix M |
I am also facing same issue with pytorch implementation. F1 score is very low when applying attention over PCNN features. Have you been able to fix it? Have you released your pytorch implementation? |
Yeah, My implementation is in https://github.com/ShomyLiu/pytorch-relation-extraction |
Is the Precision-Recall curve in the paper based on to 2000 predicted results? |
Hi, some thing about the attention confused me a lot.
the r is the query vector with relation r (the relation representation).
In train phase, is it r is the target relation label? if so, when in test phase, which r should be chosen to calculate the attention weight for the instances in a bag?
Do I misunderstand something about the paper?
Thanks.
The text was updated successfully, but these errors were encountered: