benedekrozemberczki / karateclub

Karate Club: An API Oriented Open-source Python Framework for Unsupervised Learning on Graphs (CIKM 2020)

Home Page:https://karateclub.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

save graph2vec model

riyaj8888 opened this issue · comments

Hi,
How can we save/load the graph2vec model after training?

@riyaj8888 you can use the standard techniques for scikit-learn models like pickle, joblib etc.

For example:

from joblib import dump, load
dump(model, 'saved_model.joblib') 
model2 = load('saved_model.joblib') 
embedding = model2.get_embedding()

Reference:

https://scikit-learn.org/stable/model_persistence.html