geffy / tffm

TensorFlow implementation of an arbitrary order Factorization Machine
MIT License
780 stars 176 forks source link

introduced new parameter to have a different batch size for training and testing #26

Closed babakx closed 7 years ago

babakx commented 7 years ago

Hi geffy! I did a minor change to make it possible to do the prediction in a different batch size than the batch size that is used for training.

This is useful when you want to predict the scores for a given matrix (for example test set matrix) in one go.

Best, Babak.

geffy commented 7 years ago

Hi! Thank you for contributing!

I believe it will be better to separate pred_batch_size from __init__ and use it as param in decision_function. Also, I suggest setting pred_batch_size=None by default and using pred_bach_size=batch_size in this case.

Can you please fix this?

babakx commented 7 years ago

That's a good idea! I moved the parameter to the decision_function and make the default value as None just the way you explained.

geffy commented 7 years ago

Great, thanks!