tensorflow / recommenders

TensorFlow Recommenders is a library for building recommender system models using TensorFlow.
Apache License 2.0
1.83k stars 274 forks source link

Deep recommendation load model error #186

Open yuwin opened 3 years ago

yuwin commented 3 years ago

Hi, I am following the instruction of “deep_recommenders.ipynb” notebook. I’ve done with the model training and also create the “BruteForce” layer to make the prediction.

However, when I try to save the model for the serving usage, it throw out the error message like this “The two structures don’t have the same nested structure”. I am not able to load the model which I just saved.

Here is some relative screen shot of my issue

BBDB43E9-FA10-48E8-8053-E12E154D90FC D55E2686-28AF-46EB-A8AC-6797A83AB252 1BCA5AE3-9647-41D4-A844-B8905CCB76B2

maciejkula commented 3 years ago

Colabs that I can run are much more useful than screenshots. Please consider making a colab.

It looks like you might be passing dicts of timestamp, user_id, and movie_title into your index model (before you save it), even though it only needs timestamp and user_id. Consider getting rid of the extra movie_title field.