deepakn97 / relationPrediction

ACL 2019: Learning Attention-based Embeddings for Relation Prediction in Knowledge Graphs
517 stars 124 forks source link

STransE to init embeddings error; n relations do not match #23

Closed villanuevab closed 4 years ago

villanuevab commented 4 years ago

I am attempting to rerun your results per the blogpost. I am unable to run STransE with the data files in this repo. I noticed that the number of relations between the datasets does not match:

https://github.com/datquocnguyen/STransE/issues/2

# Seg fault with identically formatted train.txt, valid.txt, test.txt, relation2id.txt, entity2id.txt
$ ./STransE -model 1 -data ../relationPrediction/data/WN18RR/ -size 50 -margin 5 -l1 1 -lrate 0.0005
Model: STransE
Dataset: ../relationPrediction/data/WN18RR/
Number of epoches: 2000
Vector size: 50
Margin: 5
L1-norm: 1
SGD learing rate: 0.0005
#relations = 11
#entities = 40943
Segmentation fault (core dumped)

# Working
$ ./STransE -model 1 -data Datasets/WN18/ -size 50 -margin 5 -l1 1 -lrate 0.0005
Model: STransE
Dataset: Datasets/WN18/
Number of epoches: 2000
Vector size: 50
Margin: 5
L1-norm: 1
SGD learing rate: 0.0005
#relations = 18
#entities = 40943
Optimize entity vectors, relation vectors and relation matrices:
# ...

Could you please share how you init the embeddings based on the data in this post? I would like to init embeddings for my own data and run this model on my own data.

Thank you!