recommenders-team / recommenders

Best Practices on Recommendation Systems
https://recommenders-team.github.io/recommenders/intro.html
MIT License
18.89k stars 3.07k forks source link

[ASK] Reshape (Custom Dataset) #658

Closed pugantsov closed 2 years ago

pugantsov commented 5 years ago

I'm currently working on a masters project in which I run a number of different models for tweet recommendation. I'm trying to use xDeepFM to no avail and was wondering where I'm going wrong.

I've followed the entire notebook with no problem but I was wanting to use my own data for this. I have an FFM training file with (according to xLearn) Feature Count: 48756, Field Count: 6475. I define this in a yaml file similar to the one provided but run into the following error:

tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 8287990 values, but the requested shape requires a multiple of 64750
     [[{{node XDeepFM/Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](XDeepFM/embedding/embedding_lookup_sparse, XDeepFM/Reshape/shape)]]
     [[{{node Mean/_37}} = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_293_Mean", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

I was wondering if maybe my training file was malformed but xLearn seems to detect the field/feature counts no problem. Happy to provide any other info, pretty new to all this.

EDIT: Just to clarify, my yaml file is identical to the one in the notebook, aside from the field/feature counts.

yueguoguo commented 5 years ago

Hey @ajhepburn can you provide more details about your data and how it is processed by xLearn?