Open zzzzzbbbbb25 opened 5 years ago
Hi, I've encountered the same error.
I looked into alphaFM/src/FTRL/predict_model.h, the function
bool predict_model<T>::load_txt_model(ifstream& in)
around line 243.
I found that the package use space to filter the argument, and unfortunately the feature name contains space in it...
I suggest you to look into fm_model.txt, and see if you have space in feature name.
I use
awk '{print $1, $2}' fm_model.txt
to print the first two columns, and then :g/0$/d
to remove all lines ended with numbers, and found what causes the error.
一直报错 load model... load model error! 不知道为啥,
Hi, I've encountered the same error. I looked into alphaFM/src/FTRL/predict_model.h, the function
bool predict_model<T>::load_txt_model(ifstream& in)
around line 243. I found that the package use space to filter the argument, and unfortunately the feature name contains space in it... I suggest you to look into fm_model.txt, and see if you have space in feature name. I useawk '{print $1, $2}' fm_model.txt
to print the first two columns, and then:g/0$/d
to remove all lines ended with numbers, and found what causes the error.
it works, thanks buddy
cat /data/zhangbo_ret/data/test_data/ptr_train_libsvm_data_alpha_test_off.txt | /root/work/FM_Recall/alphaFM/bin/fm_predict -core 15 -dim 8 -m /data/zhangbo_ret/data/test_data/alpha_fm_ptr_param_train.txt -mf txt -out /data/zhangbo_ret/data/test_data/alpha_fm_ptr_predict_result.txt
我训练的模型参数文件是 alpha_fm_ptr_param_train.txt ,是8维的,但是按照官网介绍的这样取预测样本时,一直报错 load model... load model error! 。 请问这是怎么回事啊/?我加了 -mf 参数还是不行。你们有遇到过吗?