-
Hi, What is the feature size of a node in # initialized node features
# let's say I have features from nn.embedding and its trainable
# method A
node_embed = nn.Embedding(10, 32) # (num_node, n_node_feat)
rgcn = RGCN(in_channels=32, out_channels=128, num_relations=n_relation)
x = rgcn(node_embed.weight, edge_index, edge_type) # (10, 128)
# however, what would be the size of initialized node feature in rgcn?
# in_channels ->10 nodes here
# In case no input features are given, this argument should correspond to the number of nodes in your graph.
# method B
rgcn = RGCN(in_channels=10, out_channels=128, num_relations=n_relation)
x = rgcn(x=None, edge_index, edge_type) # (10, 128) Although both approaches have the same number of So I guess the gap here would be the size of initialized node features. But I couldn't find any documentation regards this. Is there any preferred situation using Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
They are both similar. I think A is the preferred approach since B will learn an embedding matrix per edge type which is not really necessary. |
Beta Was this translation helpful? Give feedback.
They are both similar. I think A is the preferred approach since B will learn an embedding matrix per edge type which is not really necessary.