GNN are a special class of neural networks that are capable of working with data that is represented in graph form. These networks are heavily motivated by Convolutional Neural Networks and graph embedding. CNN’s are not able to handle graph data because the nodes in the graphs aren’t represented in any order and the fact that dependency information between two nodes is represented by edges.
Questions tagged [gnn]
56 questions
3
votes
0 answers
Antithetic Sampling for variance reduction in graph convolutional network (GCN)
I am trying to implement Antithetic Sampling to sample vertices of the graph and train the downstream graph convolutional network (GCN) model on the sampled graph.
Antithetic Sampling is a variance reduction technique that involves
generating pairs…

Asif
- 763
- 8
- 18
1
vote
1 answer
GNN adaptability to different number of node as input graph
I am looking at methods for GNN to process GNN based on entity graph generated on objects on the image. Node represent each object and edge is connected between two nodes if two objects' Euclidean distance is lower than a threshold. Let's say the…

user22346194
- 11
- 2
1
vote
0 answers
How to convert .pth file of LightGCN model to .pb file?
I was trying to convert a LightGCN .pth file to a pb file, but I don't know how to convert it. I used the onnx lib, but I don't know the function of dummy_input, and am not sure that was correct.
import onnx
from onnx_tf.backend import prepare
from…

Hwi
- 11
- 2
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
0 answers
How to predict links between present and a new node with PyG/GraphSage autoencoder?
I am a newbee in the field of GNN and want to use PyTorch Geometric (PyG) to train a Graph Neural Network (GNN) to predict links (edges) between nodes in a graph using an autoencoder (with a modified version of the PyG link prediction example with…

feinheitsbrei
- 51
- 2
- 5
1
vote
0 answers
Convert NetworkX heterogeneous Multigraph into PyTorch Geometric data
I have a heterogeneous graph with different node types and attributes stored as NetworkX Multigraph. I want to train a GNN model on this graph, therefore I need to convert it into PyTorch Geometric datatype.
I tried built-in function
from…

tiurina
- 11
- 2
1
vote
0 answers
GNN Graph Classification Poor Performance
I am trying to implement an extremly simple regression task with GNNs, specifically GAT Networks and am getting very poor performance. When compared to a MLP on the same task the GNN model perfroms approximatley 10x worse. I am aware that the…

Jacob Don
- 39
- 1
1
vote
1 answer
Tensorflow-GNN model.fit() error while training a skeleton-based GNN (index error)
I am using TFGNN library to build a skeleton based graph neural network for action recognition and while running a simple model I keep getting the following error. The model is simple and it is adapted from the official colab
The input GraphSchema…

Marianna
- 13
- 2
1
vote
0 answers
load/convert onnx model into pytorch
I need to use GNNExplainer which requires pytorch model.
However, my GNN model is written in keras libraries.
I tried to use this library to load my onnx model and convert into pytorch. Can Anyone help me to resolve this errors?
Here are the errors…

AliHamzaIub13
- 34
- 8
1
vote
1 answer
Pytorch Geometric: 'from_networkx' doesn't work with my 'group_node_attrs'
I' trying to convert a NetwrokX graph into the pyg format to feed it to a GCN.
from_networkx(G) works without problems
from_networkx(G, group_node_attrs=x) # doesn't work, and I get the following error:
Here the documentation about how the…

Iris
- 13
- 3
1
vote
0 answers
TypeError: Cannot iterate over a Tensor with unknown first dimension
Getting the following error when I execute the below code:
TypeError: Cannot iterate over a Tensor with unknown first dimension.
How to solve this? The error is in the line output_gcn = gcn(input_layer)
I tried reshaping the input_layer, but it…

kini.kg
- 11
- 1
1
vote
0 answers
torch_geometric.loader DataLoader doesn't create batches
Hello I am trying to create a GNN for a particle tracking project. I have a class that creates the Datset as follow:
class GraphDataset(Dataset):
def __init__(self,graph_files,transform=None, pre_transform=None):
…
0
votes
0 answers
Why does the time measured by pytorch profiler exceed the time measured using time.time?
code 1:
with torch.profiler.profile(activities=[torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA]) as prof
code 2:
(detail…

Hua Li
- 1
- 1
0
votes
0 answers
How to handle batch processing with graph neural networks?
I have a network of 225 sensors. I have data at every 5 minutes for the month of October 2022. The total observations for a node are 288*31. The data is in 2 csv files sensor_data.csv, and labels.csv
sensor_data.csv: it has 288*31 observations of…

usama
- 15
- 6
0
votes
0 answers
Comparison between DenseNet and GCN models shows abnormally high performance for GCN - Request for data leakage validation
Content:
Hello. I am attempting a binary classification task for Alzheimer's Disease (AD) and Mild Cognitive Impairment (MCI) using 3D grayscale PET brain images with pytorch.
Data: Data from 282 patients (158 with AD, 124 with MCI) and the…

이규빈
- 1