You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in user code:
File "xxxxx/rank_demo.py", line 104, in call *
text_embeddings = self.title_text_embedding(features["movie_title"])
File "xxxxx/traceback_utils.py", line 70, in error_handler **
raise e.with_traceback(filtered_tb) from None
File "xxxxx/text_vectorization.py", line 573, in _preprocess
raise ValueError(
ValueError: Exception encountered when calling layer 'text_vectorization' (type TextVectorization).
When using `TextVectorization` to tokenize strings, the input rank must be 1 or the last shape dimension must be 1. Received: inputs.shape=(None, 5) with rank=2
Call arguments received by layer 'text_vectorization' (type TextVectorization):
• inputs=tf.Tensor(shape=(None, 5), dtype=string)
Call arguments received by layer 'ranking_model' (type RankingModel):
• features={'user_id': 'tf.Tensor(shape=(None,), dtype=string)', 'movie_title': 'tf.Tensor(shape=(None, 5), dtype=string)'}
I think it's because the tfrs.examples.movielens.sample_listwise reshaped the datasets to shape=(None, 5), but how should I fix it? Really need some help here
The text was updated successfully, but these errors were encountered:
hyyan112
changed the title
combine listwise ranking with feature preprocessing
combine listwise ranking and feature preprocessing
Nov 7, 2023
https://www.tensorflow.org/recommenders/examples/listwise_ranking
by follow this doucument I wrote some code
notice that I add a text feature
but got error
I think it's because the
tfrs.examples.movielens.sample_listwise
reshaped the datasets toshape=(None, 5)
, but how should I fix it? Really need some help hereThe text was updated successfully, but these errors were encountered: