thunlp / KB2E

Knowledge Graph Embeddings including TransE, TransH, TransR and PTransE
MIT License
1.4k stars 451 forks source link

Transe代码中为什么限制L2 norm of relation? #79

Closed sbaban closed 5 years ago

sbaban commented 5 years ago

in TransE/TrainTransE.cpp line 166 . 在Transe论文中,作者提到只限制实体的L2norm为1,不需限制relation with the additional constraints that the L2-norm of the embeddings of the entities is 1 (no regularization or norm constraints are given to the label embeddings ).

这一行代码
norm(relation_tmp[fb_r[i]]); 是否是多余的

suenpun commented 5 years ago

我看了 openKE的代码,有这样的感受:代码极烂!