restore_model¶
-
ampligraph.utils.
restore_model
(model_name_path=None)¶ Restore a saved model from disk.
See also
save_model()
.Examples
>>> from ampligraph.utils import restore_model >>> import numpy as np >>> example_name = 'helloworld.pkl' >>> restored_model = restore_model(model_name_path = example_name) >>> y_pred_after = restored_model.predict(np.array([['f', 'y', 'e'], ['b', 'y', 'd']])) >>> print(y_pred_after) [-0.29721245, 0.07865551]
- Parameters
model_name_path (string) – The name of saved model to be restored. If not specified, the library will try to find the default model in the working directory.
- Returns
model – the neural knowledge graph embedding model restored from disk.
- Return type