Skip to content
Discussion options

You must be logged in to vote

I see, in this case R-GCN is still applicable but need some more work to make it work. In particular, you need to ensure that your input features are projected into a shared embedding space. This could look something like this:

def forward(self, x_dict: Dict[str, Tensor], edge_index, edge_type):
    x_dict = self.hetero_linear(data.x_dict)
    x = torch.cat([x for x in x_dict.values()], dim=0)
    x = self.rgcn_conv(x, edge_index, edge_type)

where x_dict is coming from HeteroData.x_dict and edge_index and edge_type are coming from HeteroData.to_homogeneous().

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@xubingze
Comment options

@rusty1s
Comment options

Answer selected by xubingze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants