Evaluate rank seems wrong
Closed this issue · 2 comments
moghammed commented
In the evaluate
method of model.py, the rank calculation seems wrong to me.
If I understand correctly, tf.nn.top_k(tf.reduce_sum(tf.abs(distance_head_prediction), axis=1), k=self.kg.n_entity)
will return the entities that are furthest from the predicted head, instead of the closest. So shouldn't this line be
tf.nn.top_k(-tf.reduce_sum(tf.abs(distance_head_prediction), axis=1), k=self.kg.n_entity)
ZichaoHuang commented
moghammed commented
Ah, yes, I see. Thanks for the clarification!