"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "64270eff34381fd02b21cf3129e38b0da155c81a"
Unverified Commit 613df6f9 authored by JryonGitHub's avatar JryonGitHub Committed by GitHub
Browse files

[Bugfix]fix the bug for knngraph (#1667) (#1668)



* fix the bug for knngraph (#1667)

* fix the bug for knngraph (#1667)

* fix the bug for knngraph (#1667)

* fix the bug for knngraph (#1667)

* fix the bug for knngraph (#1667)

* fix the bug for knngraph (#1667)
Co-authored-by: default avatarjiruyi <18810981229@gmail.com>
parent a0e40998
......@@ -91,7 +91,9 @@ def knn_graph(x, k):
src += per_sample_offset
dst = F.reshape(dst, (-1,))
src = F.reshape(src, (-1,))
adj = sparse.csr_matrix((F.asnumpy(F.zeros_like(dst) + 1), (F.asnumpy(dst), F.asnumpy(src))))
adj = sparse.csr_matrix(
(F.asnumpy(F.zeros_like(dst) + 1), (F.asnumpy(dst), F.asnumpy(src))),
shape=(n_points, n_points))
g = DGLGraph(adj, readonly=True)
return g
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment