takuo-h / GNN-for-OOKB

40 stars 17 forks source link

TypeError: 'tuple' object is not callable #10

Open ZMLin2020 opened 3 years ago

ZMLin2020 commented 3 years ago

I am very interested with in your work. But I got an error while running the code, i wonder there is something wrong with the version of python or chainer. The version i use: python=3.7 chainer=5.0.0 the error details are as follows: 16:26:37 load train 16:26:38 set axiaulity 16:26:38 standard setting, use: edges=links 16:26:38 load train 16:26:38 load dev dev size: 4880 16:26:38 load test test size: 19746 relation size: 11 entity size: 38194 Traceback (most recent call last): File "/home/zhiming/KM_presentation/GNN-for-OOKB/1-starndard-setting/main.py", line 330, in main(args) File "/home/zhiming/KM_presentation/GNN-for-OOKB/1-starndard-setting/main.py", line 242, in main trLoss,Ntr = train(args,m,xp,opt) File "/home/zhiming/KM_presentation/GNN-for-OOKB/1-starndard-setting/main.py", line 187, in train loss = m.train(positive,negative,glinks,gold_relations,gedges,xp) File "/home/zhiming/KM_presentation/GNN-for-OOKB/1-starndard-setting/models/ModelA0.py", line 261, in train x = self.get_context(entities,links,relations,edges,0,xp) File "/home/zhiming/KM_presentation/GNN-for-OOKB/1-starndard-setting/models/ModelA0.py", line 245, in get_context x = getattr(self,self.forwardB[order][0])(x,neighbor,neighbor_dict,assign,entities,relations) File "/home/zhiming/KM_presentation/GNN-for-OOKB/1-starndard-setting/models/ModelA0.py", line 168, in call if r%2==0: rx = getattr(self,self.forwardH[r//2][0])(rx) File "/home/zhiming/KM_presentation/GNN-for-OOKB/1-starndard-setting/models/ModelA0.py", line 42, in call x = getattr(self,name)(x) File "/home/zhiming/KM_presentation/GNN-for-OOKB/1-starndard-setting/models/ModelA0.py", line 23, in call z = self.x2z(x) TypeError: 'tuple' object is not callable