DeepGraphLearning / KnowledgeGraphEmbedding

MIT License
1.25k stars 265 forks source link

The dimension of entity vector and relation vector #7

Closed Joker-Song closed 5 years ago

Joker-Song commented 5 years ago

https://github.com/DeepGraphLearning/KnowledgeGraphEmbedding/blob/bf86876acaf2450012937c0da020027e56edd662/codes/model.py#L203-L211 Here the re_head, im_head are hidden_size vectors but the L208-L211 wouldn't change the dimension of relation vector, so the re_relation and im_relation are both hidden_size*2 vector. How can you operate them with different dimension.

Edward-Sun commented 5 years ago

https://github.com/DeepGraphLearning/KnowledgeGraphEmbedding/blob/bf86876acaf2450012937c0da020027e56edd662/codes/model.py#L41-L42

We have double_entity_embedding and double_relation_embedding arguments for our models. In the RotatE model, double_entity_embedding = True and double_relation_embedding = False. So the chunked entity dimension would be equal to the relation dimension.