Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于邻接矩阵的变换 #19

Open
yingjianling opened this issue Oct 11, 2019 · 0 comments
Open

关于邻接矩阵的变换 #19

yingjianling opened this issue Oct 11, 2019 · 0 comments

Comments

@yingjianling
Copy link

您好,关于feeder中邻接矩阵的变换我有两个疑问想请教一下:
1、gcn中一般会添加self-loop来做renormalization,但是您的代码中好像没有添加self-loop,请问这是什么原因呢
2、代码中的A通过A=A.div(D)进行了变换,但是这种变换方式并不等同于D^(-1/2)AD^(-1/2),请问这里采用A=A.div(D)是有什么特殊原因吗?如果要使用D^(-1/2)AD^(-1/2)变换,可以看下下面的写法正确吗?

D = A.sum(1, keepdim=True)
D_ = torch.diagflat(torch.pow(D,-0.5))
A = torch.mm(D_,torch.mm(A,D_))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant