novae.module.GraphEncoder
novae.module.GraphEncoder
Bases: LightningModule
Graph encoder of Novae. It uses a graph attention network.
Source code in novae/module/encode.py
__init__(embedding_size, hidden_size, num_layers, output_size, heads)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
embedding_size |
int
|
Size of the embeddings of the genes ( |
required |
hidden_size |
int
|
The size of the hidden layers in the GAT. |
required |
num_layers |
int
|
The number of layers in the GAT. |
required |
output_size |
int
|
Size of the representations, i.e. the encoder outputs ( |
required |
heads |
int
|
The number of attention heads in the GAT. |
required |
Source code in novae/module/encode.py
forward(data)
Encode the input data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
Data
|
A Pytorch Geometric |
required |
Returns:
Type | Description |
---|---|
Tensor
|
A tensor of shape |