From ce25e96bca74b3b61d47c2d0ad7d8344808dfdbf Mon Sep 17 00:00:00 2001 From: hadevin Date: Tue, 2 Feb 2021 21:16:43 -0500 Subject: [PATCH] Update dgl_graph.cc Update _contrib_csr_neighbor_non_uniform_sample and contrib_csr_neighbor_uniform_sample documentation to indicate that the expected number of arrays for seed_arrays is the num_args minus two (csr matrix and probability). --- src/operator/contrib/dgl_graph.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/operator/contrib/dgl_graph.cc b/src/operator/contrib/dgl_graph.cc index 89bee8abf655..c56557cc3111 100644 --- a/src/operator/contrib/dgl_graph.cc +++ b/src/operator/contrib/dgl_graph.cc @@ -763,7 +763,7 @@ NNVM_REGISTER_OP(_contrib_dgl_csr_neighbor_uniform_sample) uniform probability. The operator is designed for DGL. The operator outputs three sets of NDArrays to represent the sampled results -(the number of NDArrays in each set is the same as the number of seed NDArrays): +(the number of NDArrays in each set is the same as the number of seed NDArrays minus two (csr matrix and probability)): 1) a set of 1D NDArrays containing the sampled vertices, 2) a set of CSRNDArrays representing the sampled edges, 3) a set of 1D NDArrays indicating the layer where a vertex is sampled. The first set of 1D NDArrays have a length of max_num_vertices+1. The last element in an NDArray @@ -868,7 +868,7 @@ NNVM_REGISTER_OP(_contrib_dgl_csr_neighbor_non_uniform_sample) non-uniform probability. The operator is designed for DGL. The operator outputs four sets of NDArrays to represent the sampled results -(the number of NDArrays in each set is the same as the number of seed NDArrays): +(the number of NDArrays in each set is the same as the number of seed NDArrays minus two (csr matrix and probability)): 1) a set of 1D NDArrays containing the sampled vertices, 2) a set of CSRNDArrays representing the sampled edges, 3) a set of 1D NDArrays with the probability that vertices are sampled, 4) a set of 1D NDArrays indicating the layer where a vertex is sampled.