Open Chaichaithra opened 2 years ago
I have the same issue.
@Chaichaithra @jmtaverne did you figure out any solution?
This solutions worked for me replace : index.index(items.batch(100).map(model.item_model), items) by : index.index_from_dataset(items.batch(100).map(lambda items: (items, model.item_model(items))))
You saved my day. I am new to Tensorflow and I lost 4 hours trying to figure things out. Thank god I saw your comment
The below code worked for me with slight tweaking. I am sorry I do not have the original code. Hope this helps if anyone is trying TFRS. https://github.com/Chaichaithra/petrecommendation/blob/main/trs.py
ValueError: Attempt to convert a value (<MapDataset shapes: (None, 32), types: tf.float32>) with an unsupported type (<class 'tensorflow.python.data.ops.dataset_ops.MapDataset'>) to a Tensor.