Comments (4)
I thought on those steps as well and I agree with your correction actually.
from gru4rec.
I think that this comment was intended for a different repo (?), because this codebase has no get_metrics
method. (Also, the code above calls methods that are non-existent in this implementation; e.g. model.layers[1].reset_hidden_states
--> assuming that model
is a GRU4Rec
object, its layers
attribute is a list of integers that signal the size of each layer and not the list of actual GRU layers, and thus they don't have a reset_hidden_states
method. Many other things don't align with this repo either.)
The metrics (recall & MRR) can be measured by using either evaluate_sessions_batch
or evaluate_gpu
from evaluation.py
. The latter (evaluate_gpu
) is recommended, because it has higher GPU utilization. The hidden states are reset to zero in lines 184-189
. If you still use evaluate_sessions_batch
, the hidden state is reset to zero inside the predict_next_batch
method in gru4rec.py
whenever any of the session indexes change (see lines 657-662
).
((There is a third evaluation method in evaluation.py
, but that one can't be used to evaluate the GRU4Rec model. It is there for reproducing experiments with the baseline.)
from gru4rec.
Ho, sorry for that. the code comes from gru4rec Keras implementation
from gru4rec.
Very sorry, eveTu is right, the code comes from gru4rec Keras ! I close the issue right away.
Anyways, thanks for sharing your work Hidasi.
from gru4rec.
Related Issues (20)
- hello,i have some questions about the code HOT 2
- About training time HOT 1
- Is it possible to output the embedding of user/session and item vectors? HOT 1
- NOT RNN MODEL HOT 2
- Additional Negative Sampling: Conditional Statement Logic Error HOT 1
- generate_samples function call in gru4rec.py HOT 2
- BPR loss implementation question
- Fit function in gru4rec.py missing data sort HOT 1
- predict_next_batch not considering other products in the same session HOT 2
- (Question) - How to use all items in a session for prediction? HOT 2
- Where is the data file ?
- theano error HOT 2
- Can you make a brief explaination on how you calculate recall ? HOT 2
- Incremental training (retrain) support removed
- ValueError: Input dimension mis-match. (input[2].shape[0] = 2080, input[3].shape[0] = 32)
- cuda error
- GFF code
- Testing Error:: start = offset_sessions[iters] IndexError: index 2 is out of bounds for axis 0 with size 2
- Evaluating baselines
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 gru4rec.