novae.module.AttentionAggregation
novae.module.AttentionAggregation
Bases: LightningModule
Aggregate the node embeddings using attention.
Source code in novae/module/aggregate.py
__init__(output_size)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
output_size |
int
|
Size of the representations, i.e. the encoder outputs ( |
required |
Source code in novae/module/aggregate.py
forward(x, index)
Performs attention aggragation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Tensor
|
The nodes embeddings representing |
required |
index |
Tensor
|
The Pytorch Geometric index used to know to which graph each node belongs. |
required |
Returns:
Type | Description |
---|---|
Tensor
|
A tensor of shape |