thunlp / NRE

Neural Relation Extraction, including CNN, PCNN, CNN+ATT, PCNN+ATT
MIT License
810 stars 309 forks source link

Bug Report: bug in the convolution code of PCNN+ATT/test.h #6

Closed pfllo closed 7 years ago

pfllo commented 7 years ago

In the line 12 of PCNN+ATT/test.h, the code is for (int i = 0; i < 3 * dimensionC; i++) {

However, I think the code should be `for (int i = 0; i < dimensionC; i++) { which is similar to the 44th line of train.cpp.

I think the original code in test.h actually assumes that there are 3 * dimensionC convolution kernels while actually there are only dimensionC kernels.

I tested the new version of the test code with the released trained parameters and the PR curve matches the curve in the paper. And the speed is much faster than the original code.

Mrlyk423 commented 7 years ago

Thanks for indicating our mistake. I will update the right version of code soon.