Coder Social home page Coder Social logo

bpr-pytorch's People

Contributors

guoyang9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bpr-pytorch's Issues

数据集

能否将处理好的数据集新建一个文件放到代码中? 运行报找不到文件

测试阶段(偶尔)出现IndexError: index out of range in self

您好!
在我预处理数据的时候,偶尔会在测试阶段出现以下错误:

   Traceback (most recent call last):
      File , line 215, in <module>
        HR, NDCG = metrics(model, test_loader, top_k)
      File "t.py", line 174, in metrics
        prediction_i, prediction_j = model(user, item_i, item_j)
      File "anaconda3/envs/BPR/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
        return forward_call(*input, **kwargs)
      File "/t.py", line 137, in forward
        item_i = self.embed_item(item_i)
      File "/anaconda3/envs/BPR/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
        return forward_call(*input, **kwargs)
      File "/anaconda3/envs/BPR/lib/python3.10/site-packages/torch/nn/modules/sparse.py", line 158, in forward
        return F.embedding(
      File "/anaconda3/envs/BPR/lib/python3.10/site-packages/torch/nn/functional.py", line 2183, in embedding
        return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
    IndexError: index out of range in self

我用了同样的预处理方:假设我用原始数据前1000行,就会顺利跑;但如果我用全部数据,就会出现这个错误。实在debug不出来,想问问您知道原因吗?
我的train data都是[[1,2],[1,3],...].
test data [[1,4],[1,34]..]. (第一对是seen user item,之后的99对是从全部item 中挑 user1 没有看过的,以此类推。
感谢!

数据集

您好,您的数据集可以共享下吗?谢谢

How to understand the log function in the loss calculation process and negative sample in every epoch?

Hello,
I have some trouble while understanding this log function. It looks no obvious influence after removing this log Intuitively, but the experiment shows it really has about a 10% performance penalty. By increasing the number of epochs, it back to the origin line. I guess the log function may make the network convergence early. What is the difference between these two situations?

And, as I have poor knowledge about sampling, is it necessary to take a negative sample processing in every epoch?

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.