torch_geometric_signed_directed.nn.directed.DiGCN_node_classification
Classes
An implementation of the DiGCN model without inception blocks for node classification from the |
Module Contents
- class DiGCN_node_classification(num_features: int, hidden: int, label_dim: int, dropout: float = 0.5)
Bases:
torch.nn.ModuleAn implementation of the DiGCN model without inception blocks for node classification from the Digraph Inception Convolutional Networks paper.
- Parameters:
num_features (int) – Dimension of input features.
hidden (int) – Hidden dimension.
label_dim (int) – Number of clusters.
dropout (float) – Dropout value. (Default: 0.5)
- conv1
- conv2
- dropout = 0.5
- reset_parameters()
- forward(x: torch.FloatTensor, edge_index: torch.LongTensor, edge_weight: torch.FloatTensor = None) torch.FloatTensor
Making a forward pass of the DiGCN node classification model without inception blocks.
- Arg types:
x (PyTorch FloatTensor) - Node features.
edge_index (PyTorch LongTensor) - Edge indices.
edge_weight (PyTorch FloatTensor, optional) - Edge weights corresponding to edge indices.
- Return types:
x (PyTorch FloatTensor) - Logarithmic class probabilities for all nodes, with shape (num_nodes, num_classes).