ibalazevic / TuckER

TuckER: Tensor Factorization for Knowledge Graph Completion
MIT License
350 stars 60 forks source link

Reverse flag implementation #21

Closed luffycodes closed 3 years ago

luffycodes commented 3 years ago

Hey if I just change the line 194 (d = Data(data_dir=data_dir, reverse=True) in main.py file, and use reverse=False, and run the code for FB15k-237 with recommended settings, the MRR shoots up to 0.4067. Is it expected behaviour?

To replicate:

  1. Just change reverse=False in main.py
  2. CUDA_VISIBLE_DEVICES=0 python main.py --dataset FB15k-237 --num_iterations 500 --batch_size 128 --lr 0.0005 --dr 1.0 --edim 200 --rdim 200 --input_dropout 0.3 --hidden_dropout1 0.4 --hidden_dropout2 0.5 --label_smoothing 0.1

MRR keeps increasing.

Log for iteration 145: 145 21.162700176239014 0.001321860825107114 Test: Number of data points: 20466 Hits @10: 0.6135053259063813 Hits @3: 0.4763998827323366 Hits @1: 0.3409557314570507 Mean rank: 147.47825662073683 Mean reciprocal rank: 0.4335430118109515

luffycodes commented 3 years ago

Found a similar issue, so closing this !