-
Notifications
You must be signed in to change notification settings - Fork 253
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
I want to continue/resume training a pre-trained model using new triples. We may assume that there are no new entities or relations but new instants.
What is the best way to load the pre-trained model?
Or is it possible to implement something like? where continue_training=True is a flag to skip initialization?
import numpy as np
from ampligraph.latent_features import ComplEx
model = ComplEx(batches_count=1, seed=555, epochs=20, k=10)
X = np.array([['a', 'y', 'b'],
['b', 'y', 'a'],
['a', 'y', 'c'],
['c', 'y', 'a'],
['a', 'y', 'd'],
['c', 'y', 'd'],
['b', 'y', 'c'],
['f', 'y', 'e']])
model.fit(X)
print(model.get_embeddings(['f','e'], embedding_type='entity'))
X2 = np.array([['a', 'y', 'b'],
['c', 'y', 'd'],
['b', 'y', 'c'],
['f', 'y', 'm'],
['f', 'y', 'n'],
['f', 'y', 'a'],
['f', 'y', 'c'],
['f', 'z', 'c']])
model.fit(X2, continue_training=True)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request