Hi,
I got the graph adjacency matrix with sparse format by calling g.adj()
, like this:
tensor(indices=tensor([[ 3, 1, 2, ..., 19775, 19792, 19791],
[ 0, 0, 0, ..., 19791, 19791, 19792]]),
values=tensor([1., 1., 1., ..., 1., 1., 1.]),
size=(19793, 19793), nnz=126842, layout=torch.sparse_coo)
then, I want values=tensor([1., 1., 1., ..., 1., 1., 1.])
to be normalized.
Is there any existing function in dgl
to do this?
If no, I have to realize this by myself.