gammagl.layers.conv.CompConv¶
- class CompConv(in_channels, out_channels, num_relations, op='sub', add_bias=True)[source]¶
Paper: Composition-based Multi-Relational Graph Convolutional Networks
Code: https://github.com/MichSchli/RelationPrediction
- Parameters:
- propagate(x, edge_index, edge_type, aggr='sum', **kwargs)[source]¶
Function that perform message passing.
- Parameters:
x – input node feature.
edge_index – edges from src to dst.
aggr – aggregation type, default=’sum’, optional=[‘sum’, ‘mean’, ‘max’].
kwargs – other parameters dict.
- message(x, edge_index, edge_type, edge_weight=None, rel_emb=None, linear=None)[source]¶
Function that construct message from source nodes to destination nodes.
- Parameters:
x (tensor) – input node feature.
edge_index (tensor) – edges from src to dst.
edge_weight (tensor) – weight of each edge.
- Returns:
output message.
- Return type:
tensor