Update example with spmatrix. (#5219)
* update * graph Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
这个提交包含在:
+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)
|
||||
|
||||
在新工单中引用