Closed igorkf closed 3 years ago
I think the problem was this part:
self.task = tfrs.tasks.RetrievalTask(
corpus_metrics=tfrs.metrics.FactorizedTopK(
candidates=movies.batch(128).map(self.movie_model)
)
)
I changed to this, and works fine:
self.task = tfrs.tasks.Retrieval(
metrics=tfrs.metrics.FactorizedTopK(
candidates=movies.batch(128).map(self.movie_model)
)
)
Maybe the tutorial must be updated?
Hi. I'm trying to reproduce example from: https://www.tensorflow.org/recommenders/examples/movielens_side_information
I'm doing exactly like the tutorial, defining classes, methods etc. I'm using Google Colab.
But when I try to fit the model (exactly like the tutorial):
model.fit(cached_train, epochs=3)
I receive the error:
I think that this errors is due the
__call__
method in the Models.This are the models that the tutorial used.
User model
Movie model
And this is the model that user the two models above: