-
Hello pyg-team! I have a question regarding to to_hetero_with_bases function. I have a HeteroData object look like this:
For my data, node feature dim for contact is 128, while node feature dim for file is 100. I want to use to_hetero_with_bases for my SAGE model, may I ask how to configure in_channels for to_hetero_bases to let it accept different node feature dim? self.gnn = to_hetero_with_bases(self.gnn, metadata=data.metadata, num_bases=3, in_channels=?) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Please take a look at https://github.com/pyg-team/pytorch_geometric/blob/master/test/nn/test_to_hetero_with_bases_transformer.py#L133. |
Beta Was this translation helpful? Give feedback.
Yes, it can already handle this. For example, the linked test case already operates on node features of different size, see https://github.com/pyg-team/pytorch_geometric/blob/master/test/nn/test_to_hetero_with_bases_transformer.py#L117. The
in_channels
attribute into_hetero_with_bases
is just used to specify the shared embedding dim you want different node types to map to (that should be the dimension your GNN expects as input).