Sujit-O / pykg2vec

Python library for knowledge graph embedding and representation learning.
MIT License
603 stars 109 forks source link

add support of inference on pretrained model and fix predict_head/tail_rank for projection-based models #160

Closed baxtree closed 4 years ago

baxtree commented 4 years ago

This PR defines how to use pretrained models for performing tasks such as link predication on Knowledge Graphs.

Pretained models can be version controlled inside examples/pretrained/__ with the file name model.vec.pt. On inference, users can run: python inference.py -mn TransE -ld examples/pretrained/TransE/model.vec.pt # pykg2vec will load the pretrained model from the specified path.

baxtree commented 4 years ago

@louisccc There is one exemplary pretrained model at examples/pretrained/TransE/model.vec.pt. Please consider uploading ready-to-use models.