recommenders icon indicating copy to clipboard operation
recommenders copied to clipboard

Retrain retrieval model

Open nblasco opened this issue 4 years ago • 3 comments

Hi, I am very excited about tensorflow-recommenders. I've been testing the examples, and everything has worked quite well. However I would like to know how can I retrain a retrieval model? How should I load the saved model to train with new data?

nblasco avatar Oct 06 '21 15:10 nblasco

Hey @nblasco, You would need to save the query and candidate towers, and the optimiser state if you are using anything other than SGD. You could then load these models and resume training. However, if you need to add new values for any of your embedding lookups then it's going to be more tricky, like if you have an embedding for item_id, and your new training set contains previously unseen items. In this case you might need to create new embedding matrices and update values based on your previously trained model, or you might need to look into hash embeddings.

patrickorlando avatar Oct 13 '21 00:10 patrickorlando

Thanks Patrik for answering me! I understand that I must save the query model and the candidate model. And rebuild the model with these towers. However in my case it is necessary to add new items and new users daily. Will you have an example of how I can rebuild the embedder arrays adding only the new users and new items?

nblasco avatar Oct 14 '21 12:10 nblasco