EdgeCNN
¶
EdgeCNN(
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
The Dynamic Graph CNN model from the "Dynamic Graph CNN for Learning on Point Clouds" paper, a stack of
EdgeConv layers, each with a two-layer MLP
mapping 2 * in_dim features to out_dim.
The graph is fixed (given by edge_index), not recomputed from the
embeddings at every layer.
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 and inside the MLPs of the
convolutions (as PyG). Default: |
'relu'
|
norm
|
Normalization
|
Normalization between layers and inside the MLPs of the
convolutions (as PyG). Default: |
None
|
jk
|
Optional[Literal['cat', 'max', 'lstm']]
|
Jumping Knowledge mode. Default: |
None
|
**kwargs
|
Any
|
Additional arguments of |
{}
|
Example:
from mlx_graphs.nn import EdgeCNN
model = EdgeCNN(3, 64, num_layers=3, out_features_dim=10)
out = model(edge_index, node_features)
Source code in mlx_graphs/nn/models/basic_gnn.py
from mlx_graphs.nn import EdgeCNN · mlx_graphs/nn/models/edge_cnn.py