Comments (13)
While testing, you need to calculate all P(r|s) and just use the query vector with relation r' when calculating P(r'|s).
from nre.
@Mrlyk423
Thanks for your reply. It is quite clear. That is to say, the formula (10)
It is just a stack of each relation's score
o_r = M_r s + d_r
which is calculated separately rather than an extra soft-max layer.
Is that right?
from nre.
Yes
from nre.
@Mrlyk423
Thanks, your reply helps me a lot in understanding the paper.
Best.
from nre.
@Mrlyk423 but in test phase how to calculate alpha(instance attention), and how to choose the y_pred, max(p(r|s))?
from nre.
@Mrlyk423 Sorry for another question. In the test and evaluation code, why do you only calculate the the top 2000 high probability items.
for (int i=0; i<2000; i++)
{
if (aa[i].second.first!=0)
correct++;
fprintf(f,"%lf\t%lf\t%lf\t%s\n",correct/(i+1), correct/tot,aa[i].second.second, aa[i].first.c_str());
}
It seems that it cannot cover all the test data?
looking forward to your reply.
Thanks.
from nre.
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.
from nre.
@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?
Thanks.
from nre.
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)?
from nre.
In my opinion, the vector r in equation (8) shares with Matrix M
from nre.
@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?
Thanks.
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?
from nre.
Yeah, My implementation is in https://github.com/ShomyLiu/pytorch-relation-extraction
The dataset is used in this repo, which is slightly different from the newer version dataset in OpenNRE.
from nre.
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.
Is the Precision-Recall curve in the paper based on to 2000 predicted results?
from nre.
Related Issues (20)
- 关于数据的问题 HOT 5
- 实体ID的生成 HOT 2
- train.cpp: error: reference to 'end' is ambiguous HOT 5
- about the query vector HOT 2
- 关于P@N测试的一个问题 HOT 2
- am I missing something? HOT 1
- Would you like to share the trained model using the NYT datasets? HOT 1
- Word embeddings file HOT 3
- Calculate gradients and update parameters for CNN+ATT HOT 1
- 求教:ubuntu16.04 编译后,执行命令./test后,出现段错误 HOT 2
- A SEGV signal occurred in CNN+ATT/init.h: 71 HOT 2
- 数据集的问题
- How to train about my data?
- how to test in single CNN/PCNN
- 关于contextwise split
- 关于论文中的实验结果
- about weight diagonal matrix
- P@N
- about test.h in CNN+ATT HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nre.