GraphSAGE
¶
GraphSAGE(
node_features_dim: Union[int, Tuple[int, int]],
hidden_features_dim: int,
num_layers: int,
out_features_dim: Optional[int] = None,
dropout: float = 0.0,
act: Activation = "relu",
norm: Normalization = None,
jk: Optional[Literal["cat", "max", "lstm"]] = None,
**kwargs: Any,
)
Bases: BasicGNN
GraphSAGE from "Inductive Representation Learning on Large Graphs", a stack of
SAGEConv layers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_features_dim
|
Union[int, Tuple[int, int]]
|
Size of the input node features. |
required |
hidden_features_dim
|
int
|
Size of the hidden node embeddings. |
required |
num_layers
|
int
|
Number of message passing layers. |
required |
out_features_dim
|
Optional[int]
|
Size of the output. Default: |
None
|
dropout
|
float
|
Dropout probability. Default: |
0.0
|
act
|
Activation
|
Activation between layers. Default: |
'relu'
|
norm
|
Normalization
|
Normalization between layers. Default: |
None
|
jk
|
Optional[Literal['cat', 'max', 'lstm']]
|
Jumping Knowledge mode. Default: |
None
|
**kwargs
|
Any
|
Additional arguments of |
{}
|
Source code in mlx_graphs/nn/models/basic_gnn.py
from mlx_graphs.nn import GraphSAGE · mlx_graphs/nn/models/basic_gnn.py