提交

Update example with spmatrix. (#5219)

* update

* graph

Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
这个提交包含在:
Hongzhi (Steve), Chen
2023-01-20 15:39:55 +08:00
提交者 GitHub
父节点 abfc4c31f5
当前提交 30fb03a6bc
修改 11 个文件,包含 22 行新增22 行删除
+2 -2
查看文件
@@ -102,9 +102,9 @@ if __name__ == "__main__":
# Create the sparse adjacency matrix A (note that W was used as the notation
# for adjacency matrix in the original paper).
src, dst = g.edges()
indices = torch.stack(g.edges())
N = g.num_nodes()
A = dglsp.from_coo(dst, src, shape=(N, N))
A = dglsp.spmatrix(indices, shape=(N, N))
# Calculate the symmetrically normalized adjacency matrix.
I = dglsp.identity(A.shape, device=dev)