malllabiisc / CompGCN

ICLR 2020: Composition-Based Multi-Relational Graph Convolutional Networks
Apache License 2.0
597 stars 107 forks source link

Small details in Transe #18

Closed JiyaoWei closed 4 years ago

JiyaoWei commented 4 years ago

r = self.init_rel if self.p.score_func != 'transe' else torch.cat([self.init_rel, -self.init_rel], dim=0) why cat them when use ‘transe’?

cheers

soumyasanyal commented 4 years ago

For Transe variant of the CompGCN model, we found that setting the prior rel_inv = -rel helps the model performance (also seemed logical to do so). Its not directly clear how to use such priors for other models, hence we didn't try for them. You can check this line to understand that we initialize with half the embedding size for Transe variant and later concat with the negative vector.