Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/dmlc/dgl
/ sparse_matrix_to_dense
Function
sparse_matrix_to_dense
tests/python/pytorch/sparse/utils.py:139–141 ·
view source on GitHub ↗
(A: SparseMatrix)
Source
from the content-addressed store, hash-verified
137
138
139
def
sparse_matrix_to_dense(A: SparseMatrix):
140
dense = A.to_dense()
141
return
clone_detach_and_grad(dense)
142
143
144
def
sparse_matrix_to_torch_sparse(A: SparseMatrix, val=None):
Callers
8
test_compact
Function · 0.85
test_spspmul
Function · 0.85
test_index_select
Function · 0.85
test_range_select
Function · 0.85
test_sample_rowwise
Function · 0.85
test_sample_columnwise
Function · 0.85
test_spmm
Function · 0.85
test_bspmm
Function · 0.85
Calls
2
clone_detach_and_grad
Function · 0.85
to_dense
Method · 0.80
Tested by
8
test_compact
Function · 0.68
test_spspmul
Function · 0.68
test_index_select
Function · 0.68
test_range_select
Function · 0.68
test_sample_rowwise
Function · 0.68
test_sample_columnwise
Function · 0.68
test_spmm
Function · 0.68
test_bspmm
Function · 0.68