twchen / lessr

Handling Information Loss of Graph Neural Networks for Session-based Recommendation
MIT License
65 stars 19 forks source link

Question about EOPA #1

Closed Insane235 closed 4 years ago

Insane235 commented 4 years ago

Hi, may I ask how does line 19 of lessr.py guarantee the order of m, which is the neighbors' message and in random order?

_, hn = self.gru(m)
twchen commented 4 years ago

Hi, may I ask how does line 19 of lessr.py guarantee the order of m, which is the neighbors' message and in random order?

_, hn = self.gru(m)

DGL will pass the messages in the order of the edges. Since the edges are added in the order of their corresponding transitions (see the code), the messages will also be in the order of transitions.