Code Monkey home page Code Monkey logo

Comments (12)

yihong-chen avatar yihong-chen commented on August 20, 2024 1

@pd90506 You are right~

from neural-collaborative-filtering.

pd90506 avatar pd90506 commented on August 20, 2024

create a checkpoints folder yourself would fix this issue

from neural-collaborative-filtering.

SeekPoint avatar SeekPoint commented on August 20, 2024

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.

pd90506 avatar pd90506 commented on August 20, 2024

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.

yihong-chen avatar yihong-chen commented on August 20, 2024

@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.

pd90506 avatar pd90506 commented on August 20, 2024

@LaceyChen17 Thank you for providing the code. It helps me a lot learning pytorch.

from neural-collaborative-filtering.

SeekPoint avatar SeekPoint commented on August 20, 2024

it works

from neural-collaborative-filtering.

ahmetavc avatar ahmetavc commented on August 20, 2024

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.

ahmetavc avatar ahmetavc commented on August 20, 2024

I still get the same error, even though I set the config['pretrain'] to False

from neural-collaborative-filtering.

sleung852 avatar sleung852 commented on August 20, 2024

@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:

  1. trained gmf_factor model
  2. found which one is the best model (since the name of this file will be different) within the checkpoint directory
  3. then replace the setting 'checkpoints/{}'.format(YOUR_BEST_MODEL_NAME)'

from neural-collaborative-filtering.

ahmetavc avatar ahmetavc commented on August 20, 2024

It works now, thanks!

from neural-collaborative-filtering.

shawnwhale avatar shawnwhale commented on August 20, 2024

@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:

  1. trained gmf_factor model
  2. found which one is the best model (since the name of this file will be different) within the checkpoint directory
  3. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.