wencolani / TransE

An implementation of TransE with tensorflow
38 stars 19 forks source link

运行错误 #1

Closed foreseez closed 3 months ago

foreseez commented 5 years ago

老哥留个邮箱啊 有点错误 希望能请教一下

foreseez commented 5 years ago

2222222

wencolani commented 5 years ago

FB15k的数据是按照每行h \t t \t r 的形式,但是这里load_triple是要求每行为h \t r \t t的形式,将151行relationid = self.__relation2id[line_list[1]] 改为relationid = self.__relation2id[line_list[2]]即可

wencolani commented 5 years ago

152行 tailid = self.__entity2id[line_list[2]] 改为 tailid = self.__entity2id[line_list[1]]

kavinduchamiran commented 5 years ago

English version, Change line 151 and 152 of TransE.py to

relationid = self.__relation2id[line_list[2]]
tailid = self.__entity2id[line_list[1]]