Questions tagged [dgl]

50 questions
3
votes
0 answers

Reproducibility of the results for GNN using DGL grahSAGE

I'm working on a node classification problem using graphSAGE. I'm new to GNN so my code is based on the tutorials of GraphSAGE with DGL for classification task [1] and [2]. This is the code that I'm using, its a 3 layer GNN with imput size 20 and…
Luisa Roa
  • 113
  • 6
2
votes
2 answers

Classifying graph with DGL GNN without nodes attributes

I'm following this guide to create the dataset for graph classification from my own data: https://docs.dgl.ai/en/0.6.x/new-tutorial/6_load_data.html There they don't create any node's feature as it is not necessary if you are going to predict the…
2
votes
0 answers

How to do RL+graph neural network using stable-baselines3

I am new to stable-baselines3 and am trying to get a toy graph neural network problem to work. I previously had a bit flipping example using an array. The problem is this: given a list of 10 random bits and an operation which flips a bit find a…
Simd
  • 19,447
  • 42
  • 136
  • 271
2
votes
1 answer

pip install -c dglteam dgl failed

I saw from another thread that current channels could affect it. I would like to install dgl 0.4.3. and pip commands or install from environment files have failed. How can I get it installed? Below is the error log. Many thanks. Collecting package…
SaltyGamer
  • 139
  • 1
  • 6
2
votes
2 answers

How to fix RuntimeError: Bool type is not supported by dlpack

I have been using the following code to get the default Cora dataset provided by DGL, but the following error suddenly occurred today. The code was runned in CoLab (python 3.7 and Pytorch backend). I believed this is a error from the DGL update…
Junwei su
  • 138
  • 1
  • 10
2
votes
1 answer

How to visualize a graph from DGL's datasets?

The following snippet comes from the tutorial https://cnvrg.io/graph-neural-networks/. How can I visualize a graph from the dataset? Using something like matplotlib if possible. import dgl import torch import torch.nn as nn import…
Song Yang
  • 407
  • 5
  • 14
1
vote
1 answer

Unable to install dgl-cu in Google Colab

I am trying to run a graph model using dgl in Google Colab, but continue to get error when training the model. I believe my primary problem is that I can not load the dgl-cuda library using !pip install dgl-cu111 I get the following errors: Looking…
Michael
  • 87
  • 8
1
vote
0 answers

How get node features in DGL, using ID?

I'd like to get nodes with their features by using their IDS? is it possible ? if yes ? how i can do that? for example, I have source nodes IDs of an edge, as follows: >> u, v = g.edges() >> print(u) tensor([0, 1, 0, 0, 1]) And thank you in…
Driss AL
  • 21
  • 5
1
vote
1 answer

How to set the DGL node features from networkx graph

I'd like to convert the networkx graph to dgl data. But when I tried using dgl.from_networkx like tutorial, there was unexpected result. import dgl import networkx as nx import numpy as np import torch #Construct the networkx graph G containing…
Ssong
  • 184
  • 1
  • 10
1
vote
1 answer

Regression Case for Graph Neural Network

I am trying to train a simple graph neural network (and tried both torch_geometric and dgl libraries) in a regression problem with 1 node feature and 1 node level target. My issue is that the optimizer trains the model such that it gives the same…
1
vote
0 answers

The infoGraphS example in DGL

I am trying to understand the evaluate function in the InfoGraphS example thats part of the DGL examples folder. Here is the function with some of my additions: def evaluate(model, loader, num, device): error = 0 perc_error = 0 …
1
vote
0 answers

tensorflow biased sample from sparse matrix

I have a sparse adjacency matrix (around 1.5mln X 1/5 mln symmetrical) with 50% rows < 5 elements, whose sparse representation fits in the gpu entirely (around 3GB). I would like to sample up to n (32) elements from interested rows of a batch (size…
Nodiz
  • 333
  • 2
  • 8
1
vote
1 answer

Any method to transform 'DGL.heterograph' to 'torch_geometric' graph?

I'm using dgl library since it was easy to understand.. But I need several modules in torch_geometric, but they don't support dgl graph. Is there any way to change dgl graph to torch_geometric graph? My datasets are built in dgl graph, and I'm gonna…
HOYIN
  • 21
  • 2
1
vote
0 answers

Replace concat function with min, max, sum or Hadamard function in implementation of graph attention network using dgl

I'm using dgl implementation of graph attention network code in python:     Understand Graph Attention Network — DGL 0.6.1 And I want to use min, max, sum or Hadamard function instead of concatenation function in equation (2) of the implementation.…
1
vote
1 answer

Build KNN graph over some subset of Node features

I have a point cloud that I want to use a graph neural network on. Each point in the point cloud is characterised by its positional coordinates as well as it's color. So a single node is (X, Y, Z, C). Now I want to apply an Edge Convolution on this…
Animesh Sinha
  • 817
  • 2
  • 11
  • 24
1
2 3 4