Open tansaku opened 3 years ago
Can you try use_ids_vocabulary.adapt(training_dataset.map(lambda x, y: y)
?
many thanks for replying, that's fixed it and I've got things working (I think).
Really appreciate your help - my question now becomes if there's a simple way to adjust the basic model to recommend other users to users based on overlapping commonalities ... maybe I should open that as a separate question ...
I'm trying to replicate the quick start recommender with some csv data, and using the pandas
read_csv
operation.Reading the csv data works and I can inspect it, e.g.
and I can view the
.head()
the data appears as expected. The type of themy_file_train
isFollowing the approach taken in https://stackoverflow.com/questions/58362316/how-do-i-go-from-pandas-dataframe-to-tensorflow-batchdataset-for-nlp I can get a DataSet from the Panda DataFrame
The type of
training_dataset
is:but so then I try to build vocabularies as in the example, where we see code like this:
and I had thought that I could do something similar like this:
since the DataSet I have is tuples rather than a dictionary, but I get the following error:
which probably just exposes that I'm taking completely the wrong approach somewhere, but I'd be very grateful if anyone could set me on track.
Would it be simpler to create my own tfds dataset a la https://www.tensorflow.org/datasets/add_dataset rather than converting it on the fly? or is there some thing simple that I'm missing in terms of the manipulation that I'm trying to do?