Logo
  • Installation
  • Introduction
  • Citing
  • Data Structures
    • Data Classes
    • Benchmark Datasets
    • Node Splitting
    • Edge Splitting
  • Real-World Data Set Descriptions
    • Directed Unsigned Real-World Data Sets
    • Signed Real-World Data Sets
  • Case Study Examples
    • Case Study on Signed Networks
    • Case Study on Directed Networks
  • External Resources
    • External Resources - Architectures
    • External Resources - Synthetic Data Generators
    • External Resources - Real-World Data Sets
  • PyTorch Geometric Signed Directed Models
    • Directed (Unsigned) Network Models and Layers
    • Signed (Directed) Network Models and Layers
    • Auxiliary Methods and Layers
  • PyTorch Geometric Signed Directed Data Generators and Data Loaders
    • Data Classes
    • Data Generators
    • Data Loaders
  • PyTorch Geometric Signed Directed Utils
    • Task-Specific Objectives and Evaluation Methods
    • Utilities and Preprocessing Methods
PyTorch Geometric Signed Directed
  • torch_geometric_signed_directed.nn.directed.DiGCN_link_prediction
  • View page source

torch_geometric_signed_directed.nn.directed.DiGCN_link_prediction

Classes

DiGCN_link_prediction

An implementation of the DiGCN model without inception blocks for link prediction from the

Module Contents

class DiGCN_link_prediction(num_features: int, hidden: int, label_dim: int, dropout: float = 0.5)

Bases: torch.nn.Module

An implementation of the DiGCN model without inception blocks for link prediction from the Digraph Inception Convolutional Networks paper.

Parameters:
  • num_features (int) – Dimension of input features.

  • hidden (int) – Hidden dimension.

  • label_dim (int) – The dimension of labels.

  • dropout (float) – Dropout value. (Default: 0.5)

conv1
conv2
dropout = 0.5
linear
reset_parameters()
forward(x: torch.FloatTensor, edge_index: torch.LongTensor, query_edges: 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:
  • query_edges (PyTorch Long Tensor) - Edge indices for querying labels.

  • x (PyTorch FloatTensor) - Logarithmic class probabilities for all nodes, with shape (num_nodes, num_classes).


© Copyright 2026, Yixuan He.

Built with Sphinx using a theme provided by Read the Docs.