CRIPAC-DIG / SR-GNN

[AAAI 2019] Source code and datasets for "Session-based Recommendation with Graph Neural Networks"
820 stars 269 forks source link

The difference in 5 equation in paper and code #35

Open Tismoney opened 4 years ago

Tismoney commented 4 years ago

In original paper the last rule of update node vector is: $vi^t = (1 - z{s, i}^t) \odot vi^{t-1} + z{s, I}^t \odot v_i^t$. But following the code, the rules is not the same: https://github.com/CRIPAC-DIG/SR-GNN/blob/90123c88850eec8c574518fee6e46aefb42acb94/pytorch_code/model.py#L45-L47 Code's rule is: $vi^t = (1 - z{s, i}^t) \odot vi^t + z{s, I}^t \odot v_i^{t-1}$. The difference is swap v_i^t and v_i^{t-1}.

Is it mistake in paper or in code?

Tismoney commented 4 years ago

As I understand, there is not mistake conceptually. In paper $z$ learns how much information save, but in code it is responsible how much information forget. Am I right?

yichudu commented 4 years ago

As I understand, there is not mistake conceptually. In paper $z$ learns how much information save, but in code it is responsible how much information forget. Am I right?

the readability of the code in this repository is too bad.

wangzglife commented 3 years ago

I agree with you, I also found that this may be a mistake