yhs968 / pygru4rec Goto Github PK
View Code? Open in Web Editor NEWPyTorch Implementation of Session-based Recommendations with Recurrent Neural Networks(ICLR 2016, Hidasi et al.)
PyTorch Implementation of Session-based Recommendations with Recurrent Neural Networks(ICLR 2016, Hidasi et al.)
It seems the recall degrade in this way
thank you
hidden = reset_hidden(hidden, mask).detach()
Hi, Yhs, I am interested in your code. But I do not know where can I obtain the training data and test data. Help please.
Training GRU4REC...
epoch: 1/loss:5.118/recall:0.502/mrr:0.221/time:22.532
epoch: 2/loss:4.908/recall:0.599/mrr:0.267/time:22.467
epoch: 3/loss:4.867/recall:0.613/mrr:0.274/time:22.493
epoch: 4/loss:4.848/recall:0.619/mrr:0.276/time:22.521
epoch: 5/loss:4.836/recall:0.622/mrr:0.277/time:22.520
Test result: loss:5.878/recall:0.177/mrr:0.074/time:0.029
the preprocess is very slow
mask = [] # indicator for the sessions to be terminated
finished = False
while not finished:
minlen = (end - start).min()
Here, mask = []
should be within the while loop while not finished:
?
Dear Younghun Song,
First of all, I really thank you for your useful implementation. It is simpler than original code except a point. In function BPRLoss, I don't understand why the shape of logit is BxB. I think that it should be B x n_item.
Can you explain it to me?
Thank you for your help :)
Hi, thank you for your work.
Here I have a question for your top-1 loss implementation.
At modules/loss.py: line 56
loss = F.sigmoid(diff).mean() + F.sigmoid(logit ** 2).mean()
If I understood top-1 loss and your code, logit
have already contained positive sample, but F.sigmoid(logit ** 2).mean() should be applied for only negative samples
Could you please check whether I understand right?
Thanks!
It is right. I mistake nonzero of numpy and torch, sorry...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.