R0oup1iao / Traffic-Transformer

This is a Pytorch implementation of Traffic Transformer. Now the corresponding paper is available online at
https://ieeexplore.ieee.org/document/9520129
23 stars 5 forks source link

K-hop adjacent matrix 理解 #2

Open C3Shirt opened 2 years ago

C3Shirt commented 2 years ago

out = 0 for i in range(1, 7): out += mask ** i self.mask = out == 0 代码里的mask表示的含义就是节点vi,只获取k步以内能够到达的节点信息,其它的就屏蔽掉,是这样理解的吗?