HazyResearch / KGEmb

Hyperbolic Knowledge Graph embeddings.
250 stars 47 forks source link

Inference and post-processing question #11

Open racoutinho opened 3 years ago

racoutinho commented 3 years ago

Hi guys! I'm trying to test this repo, and I could train successfully using WN18RR dataset. But I'm trying to use the trained model to perform inference with the test sample and I'm confused about how to interpret the predictions. In essence, I'm trying to run the code snippet below.

test_examples = test_examples.to(device)
predictions, factors = model.forward(test_examples, eval_mode=True)
print(predictions)

My question is: How I can properly process the output predictions and efficiently decode the predicted indexes to the corresponding original triplet English text?

If you could provide a code snippet for this would be awesome!

Thanks!

HammerWang98 commented 2 years ago

Have u addressed it?