MCPcopy
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
139def sparse_matrix_to_dense(A: SparseMatrix):
140 dense = A.to_dense()
141 return clone_detach_and_grad(dense)
142
143
144def sparse_matrix_to_torch_sparse(A: SparseMatrix, val=None):

Callers 8

test_compactFunction · 0.85
test_spspmulFunction · 0.85
test_index_selectFunction · 0.85
test_range_selectFunction · 0.85
test_sample_rowwiseFunction · 0.85
test_sample_columnwiseFunction · 0.85
test_spmmFunction · 0.85
test_bspmmFunction · 0.85

Calls 2

clone_detach_and_gradFunction · 0.85
to_denseMethod · 0.80

Tested by 8

test_compactFunction · 0.68
test_spspmulFunction · 0.68
test_index_selectFunction · 0.68
test_range_selectFunction · 0.68
test_sample_rowwiseFunction · 0.68
test_sample_columnwiseFunction · 0.68
test_spmmFunction · 0.68
test_bspmmFunction · 0.68