panzheyi / ST-MetaNet

The codes and data of paper "Urban Traffic Prediction from Spatio-Temporal Data Using Deep Meta Learning"
MIT License
194 stars 73 forks source link

Regarding update function in MetaGat #7

Closed cmcuza closed 3 years ago

cmcuza commented 3 years ago

Hi,

Thank you for sharing the code.

In the article, you said that the new state h(i) of MetaGAT is calculated by a linear combination of the previous hidden state and the new state calculated with the attention mechanism. In other words:

Screenshot from 2020-11-10 17-36-12

However, in the code, I can only find the right side of the equation in the function msg_reduce. Is this enough or maybe a msg_update function should be added to apply the previous formula?

Thank you in advance, Best regards.

panzheyi commented 3 years ago

Hi, the implementation of this code is slightly different from the paper.

The implementation is:

(pls refer to line 128 in flow-prediction/src/model/seq2seq.py and msg_reduce).

The only difference is the scale of the hidden states. And such a difference can be tackled by neural networks.

Anyway, both implementations are available to reproduce the reported results in our paper.

cmcuza commented 3 years ago

Hi, thank you for the reply :+1: