-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好,想请教一下关于prediction的结果 #22
Comments
如果我没理解错你的意思,那你的问题是直接在main.py里加model.predict()时self._cur_user_embeddings和self._cur_item_embeddings不是最优epoch时的user和item embedding。那么需要先save最优的checkpoint然后restore,或者save user/item embedding再reload回来。至于怎样确定最优的epoch,可以参考code里关于early stopping的做法。 |
您好,我之后有先做pretrain = 0,save flag = 1去train,结束后改成pretrain = 1, save flag=0 rerun,model本身是load了training时候的best epoch,但是再做test_dict = dataset.get_user_test_dict(), model.train_model() |
model.train_model()是重新训练了模型吗? |
应该没有,rerun时候log里只有epoch 0,是上一次的最好model然后就停下来了 |
您好,最近在使用您的repo跑一些自己的数据,但关于最后的prediction的code想请教一下。
我在main.py里model.train_model()之后加入了model.predict(test_data),但prediction结果和在evaluate时候每一个epoch之后我单独存下来的prediction结果都不一样。我做的是一样的处理,取train里的为-inf,sort后选取top 20,evaluate里存的值和您的code在log里的metrics结果是一致的。所以想请教如果是想在main.py里储存best epoch的prediction result大概要怎么做,感谢!
The text was updated successfully, but these errors were encountered: