torch_geometric_signed_directed.nn.directed.DGCNConv ==================================================== .. py:module:: torch_geometric_signed_directed.nn.directed.DGCNConv Classes ------- .. autoapisummary:: torch_geometric_signed_directed.nn.directed.DGCNConv.DGCNConv Module Contents --------------- .. py:class:: DGCNConv(improved: bool = False, cached: bool = False, add_self_loops: bool = True, normalize: bool = True, **kwargs) Bases: :py:obj:`torch_geometric.nn.conv.MessagePassing` An implementatino of the graph convolutional operator from the `Directed Graph Convolutional Network `_ paper. The same as Kipf's GCN but remove trainable weights. :Parameters: * **improved** (*bool, optional*) -- If set to :obj:`True`, the layer computes :math:`\mathbf{\hat{A}}` as :math:`\mathbf{A} + 2\mathbf{I}`. (default: :obj:`False`) * **cached** (*bool, optional*) -- If set to :obj:`True`, the layer will cache the computation of :math:`\mathbf{\hat{D}}^{-1/2} \mathbf{\hat{A}} \mathbf{\hat{D}}^{-1/2}` on first execution, and will use the cached version for further executions. This parameter should only be set to :obj:`True` in transductive learning scenarios. (default: :obj:`False`) * **add_self_loops** (*bool, optional*) -- If set to :obj:`False`, will not add self-loops to the input graph. (default: :obj:`True`) * **normalize** (*bool, optional*) -- Whether to add self-loops and compute symmetric normalization coefficients on the fly. (default: :obj:`True`) * **\*\*kwargs** (*optional*) -- Additional arguments of :class:`torch_geometric.nn.conv.MessagePassing`. .. py:attribute:: improved :value: False .. py:attribute:: cached :value: False .. py:attribute:: add_self_loops :value: True .. py:attribute:: normalize :value: True .. py:method:: reset_parameters() .. py:method:: forward(x: torch.Tensor, edge_index: torch_geometric.typing.Adj, edge_weight: torch_geometric.typing.OptTensor = None) -> torch.Tensor Making a forward pass of the graph convolutional operator. Arg types: * x (PyTorch FloatTensor) - Node features. * edge_index (Adj) - Edge indices. * edge_weight (OptTensor, optional) - Edge weights corresponding to edge indices. Return types: * out (PyTorch FloatTensor) - Hidden state tensor for all nodes. .. py:method:: message(x_j: torch.Tensor, edge_weight: torch_geometric.typing.OptTensor) -> torch.Tensor .. py:method:: message_and_aggregate(adj_t: torch_geometric.typing.SparseTensor, x: torch.Tensor) -> torch.Tensor