geffy / tffm

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

libfm benchmark #7

Open geffy opened 8 years ago

geffy commented 8 years ago

Need to compare tffm and libfm in terms of speed and quality.

Vimos commented 8 years ago

tffm is working quite well on my machine, much faster than other single core libraries like libfm and fastFM. But I found a small problem for regression, tffm tends to give higher values than libfm or fastFM, I guess this may be caused by not given max or min of predictions.

In libfm, there is a line

double p = predict_case(data); 
p = std::min(max_target, p);
p = std::max(min_target, p);

I don't think these code is a must, making it configurable definitely offers more choices.

Vimos commented 8 years ago

Another interesting point, tffm seems using a lot more memory, a recent test shows that after init with about 40GB memory, the peak for each epoch may reach 70-80GB, but drops to 40GB at the end of each epoch.

geffy commented 8 years ago

As I know, TF tends to allocate a lot of memory even if it doesn't actually use it. But you are right, no memory optimization been done here.