Comments (12)
@pd90506 You are right~
from neural-collaborative-filtering.
create a checkpoints folder yourself would fix this issue
from neural-collaborative-filtering.
No, it doesn't work
In fact, it lack of gmf_factor8neg4_Epoch100_HR0.6391_NDCG0.2852.model---the pretrained file
from neural-collaborative-filtering.
OK, this repo's author mentioned that he tested it without pretraining. You can add the pretrained model yourself though.
What I did is simply set the config['pretrain'] to False, which will converge slower, but still works.
from neural-collaborative-filtering.
@lovejasmine If you want to use pretrained GMF models while training MLP models, you have to specify where the pretrained GMF model file is, which means you would have to train your GMF model first.
from neural-collaborative-filtering.
@LaceyChen17 Thank you for providing the code. It helps me a lot learning pytorch.
from neural-collaborative-filtering.
it works
from neural-collaborative-filtering.
File "train.py", line 95, in
engine.save(config['alias'], epoch, hit_ratio, ndcg)
File "/Users/ahmetavci/Desktop/ncf-pytorch/src/engine.py", line 86, in save
save_checkpoint(self.model, model_dir)
File "/Users/ahmetavci/Desktop/ncf-pytorch/src/utils.py", line 9, in save_checkpoint
torch.save(model.state_dict(), model_dir)
File "/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 219, in save
return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
File "/anaconda3/lib/python3.6/site-packages/torch/serialization.py", line 142, in _with_file_like
f = open(f, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/gmf_factor8neg4-implict_Epoch0_HR0.1025_NDCG0.0454.model'
from neural-collaborative-filtering.
I still get the same error, even though I set the config['pretrain'] to False
from neural-collaborative-filtering.
@ahmetavci07
mate -> FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/gmf_factor8neg4-implict_Epoch0_HR0.1025_NDCG0.0454.model'
This is the output file of your trained up the gmf_factor model.
So what you really needed to do:
- trained gmf_factor model
- found which one is the best model (since the name of this file will be different) within the checkpoint directory
- then replace the setting 'checkpoints/{}'.format(YOUR_BEST_MODEL_NAME)'
from neural-collaborative-filtering.
It works now, thanks!
from neural-collaborative-filtering.
@ahmetavci07
mate -> FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/gmf_factor8neg4-implict_Epoch0_HR0.1025_NDCG0.0454.model'
This is the output file of your trained up the gmf_factor model.
So what you really needed to do:
- trained gmf_factor model
- found which one is the best model (since the name of this file will be different) within the checkpoint directory
- then replace the setting 'checkpoints/{}'.format(YOUR_BEST_MODEL_NAME)'
Is it normal that my pre-trained best model is significantly stronger than the author's default model?
'pretrain_mlp': 'checkpoints/{}'.format('mlp_factor8neg4_Epoch100_HR0.5606_NDCG0.2463.model'), ----author's default model
But here's what I got HR0.64+ and NDGG0.37+ @yihong-chen @sleung852
I didn't change the code, why did I get such good results
from neural-collaborative-filtering.
Related Issues (19)
- AssertionError: CUDA is not available HOT 4
- Add LICENSE.txt
- the performance of ncf in hr@10 didn't achieve 0.7 HOT 4
- NeuMF algorithm HOT 1
- L2 regularization HOT 1
- Missing layer and training workflow HOT 2
- Does hyper parameter "l2_regularization" works? I didn't find anywhere in "mlp.py" related to this parameter
- size mismatch for fc_layers
- ModuleNotFoundError: No module named 'tensorboardX'
- The NDCG metric HOT 3
- AssertionError
- The GPU utilization is low HOT 2
- The code implementation does not match the original paper HOT 4
- How to apply NCF to datasets that only have the number of interactions? HOT 9
- question about the version of pytorch HOT 8
- 0 NDCG and HR for training NeuMF and GMF HOT 2
- Test Dataloader for large dataset. HOT 4
- Wrong Neumf config ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neural-collaborative-filtering.