malllabiisc / RESIDE

EMNLP 2018: RESIDE: Improving Distantly-Supervised Neural Relation Extraction using Side Information

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some problems about code

ssppff opened this issue · comments

Hello! I encountered such a problem when reproducing the code. During the training, 432 lines of the base.py code reported an error. Sess in "test_loss, test_acc, y, y_pred, logit_list, y_hot = self.predict(sess, data, label)" was not defined. I did not find a good method after debugging. I hope to get your help.

Try passing sess in lines 498, 503 and 503.
Change the function definition in line 417 to :
def getPscore(self, sess, data, label='P@N Evaluation'):

Hope this helps.
I have created a PR. Hope this solves your issue.

Try passing sess in lines 498, 503 and 503.
Change the function definition in line 417 to :
def getPscore(self, sess, data, label='P@N Evaluation'):

Hope this helps.
I have created a PR. Hope this solves your issue.
Hello, I follow your method in line 417: def getpscore (self, sess, data, label ='p @ n evaluation '):. But a new type of error was reported.I hope to get your help.
微信图片_20191215172146

you did not pass sess in line #498, 503 and 508.
Change the line from

self.getPscore(self.test_one, label='P@1 Evaluation')

to

self.getPscore(sess, self.test_one, label='P@1 Evaluation')

and so on in the three lines where it is called.