Reputation: 51
I am working on Graph neural network using PyTorch geometric for node classification task. I would like to ask for GCNconv layer, I noticed that it supports edge_weight attribute
my questions:
what does the value of edge weight means in PyTorch geometric? (do larger values mean more similar or not)?
what is the data type of the edge-weight tensor?
any ideas how to compute the edge weight between two nodes given the node features are the color and position?
Upvotes: 0
Views: 2225
Reputation: 451
Upvotes: 0
Reputation: 1
You can look at https://pytorch-geometric.readthedocs.io/en/latest/cheatsheet/gnn_cheatsheet.html
SparseTensor
: If checked (✓), supports message passing based ontorch_sparse.SparseTensor
, e.g.,GCNConv(...).forward(x, adj_t)
. See here for the accompanying tutorial.
edge_weight
: If checked (✓), supports message passing with one-dimensional edge weight information, e.g.,GraphConv(...).forward(x, edge_index, edge_weight)
.
edge_attr
: If checked (✓), supports message passing with multi-dimensional edge feature information, e.g.,GINEConv(...).forward(x, edge_index, edge_attr)
.bipartite: If checked (✓), supports message passing in bipartite graphs with potentially different feature dimensionalities for source and destination nodes, e.g.,
SAGEConv(in_channels=(16, 32), out_channels=64)
.static: If checked (✓), supports message passing in static graphs, e.g.,
GCNConv(...).forward(x, edge_index)
withx
having shape[batch_size, num_nodes, in_channels]
.lazy: If checked (✓), supports lazy initialization of message passing layers, e.g.,
SAGEConv(in_channels=-1, out_channels=64)
.
Upvotes: -1