Giter Club home page Giter Club logo

Comments (4)

eveTu avatar eveTu commented on July 23, 2024

I thought on those steps as well and I agree with your correction actually.

from gru4rec.

hidasib avatar hidasib commented on July 23, 2024

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.

eveTu avatar eveTu commented on July 23, 2024

Ho, sorry for that. the code comes from gru4rec Keras implementation

from gru4rec.

JustAnotherDataScientist avatar JustAnotherDataScientist commented on July 23, 2024

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)

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.