在 2016年1月20日星期三 UTC+8上午11:32:46,
mensur...@gmail.com写道:
Hello, I encountered similar problem with you. I used als method and -load_model at the same time but got a warning:
WARNING: load/save enabled only for SGD and ALS. Nothing will be loaded.
and the results in -out is all zero.
Then I checked the source code and found this in libfm.cpp:
line128-132:
if (! cmdline.getValue(param_method).compare("als")) { // als is an mcmc without sampling and hyperparameter inference
cmdline.setValue(param_method, "mcmc");
if (! cmdline.hasParameter(param_do_sampling)) { cmdline.setValue(param_do_sampling, "0"); }
if (! cmdline.hasParameter(param_do_multilevel)) { cmdline.setValue(param_do_multilevel, "0"); }
}
Now, the param_method turned to "mcmc",
line256-267:
if (cmdline.hasParameter(param_load_model)) {
std::cout << "Reading FM model... \t" << std::endl;
if (!cmdline.getValue(param_method).compare("sgd") || !cmdline.getValue(param_method).compare("als")){ //load/save enabled only for SGD and ALS
if(!fm.loadModel(cmdline.getValue(param_load_model))){
std::cout << "WARNING: malformed model file. Nothing will be loaded." << std::endl;
fm.init();
}
}
else{
std::cout << "WARNING: load/save enabled only for SGD and ALS. Nothing will be loaded." << std::endl;
}
}
Surely, it will print "WARNING: load/save enabled only for SGD and ALS. Nothing will be loaded." and not load model.
So, could you please tell me how did you solve your problem or how did you use als and load_model?
Thank you!