Questions tagged [gnn]

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.

56 questions
0
votes
0 answers

RuntimeError: Expected size for first two dimensions of batch2 tensor to be: [128, 1024] got: [128, 3072]

The code I'm trying: `def compute_acc(model, data_loader, device): correct_pred, num_examples = 0, 0 for features, targets in data_loader: features = features.to(device) targets = targets.to(device) logits, probas = model(features) _,…
SwDL
  • 1
  • 2
0
votes
0 answers

How does EdgeConv architecture work on pytorch geometric?

I am trying to understand the EdgeConv model and its Pytorch geometric implementation. I read the paper called "Dynamic Graph CNN for Learning on Point Clouds" and I could not form some of the connections between the implementation on the pytorch…
0
votes
0 answers

Is there a way to convert smiles format to TUdataset format?

I am facing one issue that I have Tudataset format which is having https://chrsmrrs.github.io/datasets/docs/format/ format. I got few more graph datasets which is in molecular format (smiles format) for example smiles format looks like following Is…
0
votes
0 answers

What does the POS field in a Pytorch Geometric Dataset Do?

I'm looking at MNISTSuperpixels dataset, and I see a bunch of fields in each instance. X, Y, and edge_index I understand, but I can't for the life of me figure out what the POS field does.
Lucian cahil
  • 83
  • 1
  • 2
  • 8
0
votes
0 answers

I cannot debug a program that references sknetwork by pycharm, and some Attributes not found,such as adjacency

As the title,I use PyCharm write a program, when there are some error as the picture showing. enter image description here It reminder that sknetwork-topology-kcliques.pyx can't be found in my remote project. so I copy all files in the sknetwork…
0
votes
0 answers

Out-of-Memory when batch training GNN on Very large graph

I use the dgl library to batch train the graph neural network model on a very large graph, and the sampling method is MultiLayerFullNeighborSampler(2). But even if the batch size is set to 1, a certain subgraph may have tens of millions of edges due…
Xiaoyi
  • 1
0
votes
0 answers

I have an error when I install pyg through anaconda

I am currently working on pyg and I have an issue regarding with pyg installation. I am using Windows and anaconda now. I used conda install pyg -c pyg within my virtual env using anaconda. and execute the code below. import torch from torch import…
0
votes
0 answers

Shape mismatch between logits and labels for computing loss on 3D data in GCN

RuntimeError: Expected target size [25, 10], got [25]. I have a sensors data and I want to perform node level classification using GCN. I have k nodes (sensors). Each node has m observations (node features) and each observation is a n dimensional…
yari
  • 1
  • 1
0
votes
1 answer

pytorch geometric data - split into positive and negative train/test edges using a timestamp

I'm using pytorch geometric. My data is of the class: torch_geometric.data.Data. Most tutorials I see use torch_geometric.utils.train_test_split_edges (depreciated now, recommended to use torch_geometric.transforms.random_link_split. Any way, both…
zelda26
  • 489
  • 2
  • 10
  • 33
0
votes
1 answer

Reshape data to be usable for training GCN in PyTorch

I am trying to build Graph Convolutional Network. I converted my dataframe to PyTorch required format using below code. class S_Dataset(Dataset): def __init__(self, df, transform=None): self.df = df self.transform = transform def…
0
votes
0 answers

Encounter "Nan" when training but "Nan" disappear when debugging/printing/logging when I want to train a deep model

When I train a model, the score will become "Nan", like this: def forward(self, input): alias_inputs, A, items, mask, targets = input hidden = self.embedding(items) seq_output = self.seq_modeling(alias_inputs, A,…
cy09
  • 1
  • 1
0
votes
0 answers

adj, vec = _mnist_img_grid_graph(train[2].reshape(28, 28), 6, threshold=0.0)

I am getting the error TypeError: 'function' object is not subscriptable. I am trying to implement gnn on the mnist dataset and then visualize the graph generated. I tried using square brackets at the end as i read on some websites but it did not…
Mayur
  • 1
0
votes
1 answer

how to construct graph from house price prediction dataset

I have a dataset of house price predictions. House id society_id building_type households yyyymmdd floor price date 204 a9cvzgJ 170 185 01/02/2006 3 43000 01/02/2006 100 a4Nkquj 170 150 01/04/2006 13 46300 01/04/2006 the dataset has…
mlopsss
  • 25
  • 3
0
votes
1 answer

mse loss in pytorch geometric gives nan for loss function

I am doing a regression problem using GCN with pytorch geometric. And I am getting nan loss while using mse loss. However, output tensor is not nan. Here is my model- import torch import torch.nn.functional as F from torch_geometric.nn import…
0
votes
0 answers

How to build a simple graph federated learning framework?

Now I want to build a simple graph federated learning framework. At present, I have the following questions: In addition to FedML, is there any other graph federated learning framework? How to start building such a framework? I don't konw where to…