gammagl.models.DGCNN¶
- class DGCNN(feature_dim, hidden_dim, num_layers, gcn_type='gcn', k=0.6, train_dataset=None, dropout=0.5, name=None)[source]¶
DGCNN proposed in “An End-to-End Deep Learning Architecture for Graph Classification” paper.
- Parameters:
feature_dim (int) – input feature dimension.
hidden_dim (int) – hidden dimension.
num_layers (int) – number of layers.
gcn_type (str) – convolution layer type.
k (int or float) – The number of nodes to hold for each graph in SortPooling.
train_dataset (dataset) – train dataset to extract minimum number of nodes to generate k.
dropout (float) – dropout rate.
name (str) – model name.
- forward(x, edge_index, batch)[source]¶
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.