This PR introduce a general framework named BasicGEModel (Basic graph embedding model) following the discussion in #82 . Graph Embedding models, either knowledge graph embedding models or GNN based graph embedding models will follow this framework.
This PR focus on providing Python API support for model inference. To do edge score inference, one can follow the following operations:
To do embedding similarity inference, one can follow the following operations:
gamma = 2.0
transe_model = TransEModel('cpu', gamma)
transe_model.load(PATH_TO_MODEL)
# we omit attach_graph, as the graph structure is not used
result = transe_model.embed_sim(...)
Further, in the link_predict inference, we will support different edge excluding mode:
None, existing edges are not excluded.
mask, existing edges are masked using a th.bool tensor.
exclude, existing edges are excluded in the result.
This PR introduce a general framework named BasicGEModel (Basic graph embedding model) following the discussion in #82 . Graph Embedding models, either knowledge graph embedding models or GNN based graph embedding models will follow this framework.
This PR focus on providing Python API support for model inference. To do edge score inference, one can follow the following operations:
To do embedding similarity inference, one can follow the following operations:
Further, in the link_predict inference, we will support different edge excluding mode:
This PR also fix #151