torch_geometric_signed_directed.nn.signed.SNEA ============================================== .. py:module:: torch_geometric_signed_directed.nn.signed.SNEA Classes ------- .. autoapisummary:: torch_geometric_signed_directed.nn.signed.SNEA.SNEA Module Contents --------------- .. py:class:: SNEA(node_num: int, edge_index_s: torch.LongTensor, in_dim: int = 64, out_dim: int = 64, layer_num: int = 2, init_emb: torch.FloatTensor = None, init_emb_grad: bool = True, lamb: float = 4) Bases: :py:obj:`torch.nn.Module` The signed graph attentional layers operator from the `"Learning Signed Network Embedding via Graph Attention" `_ paper :Parameters: * **node_num** (*int*) -- The number of nodes. * **edge_index_s** (*LongTensor*) -- The edgelist with sign. (e.g., torch.LongTensor([[0, 1, -1], [0, 2, 1]]) ) * **in_dim** (*int, optional*) -- Size of each input sample features. Defaults to 64. * **out_dim** (*int, optional*) -- Size of each output embeddings. Defaults to 64. * **layer_num** (*int, optional*) -- Number of layers. Defaults to 2. * **init_emb** -- (FloatTensor, optional): The initial embeddings. Defaults to :obj:`None`, which will use TSVD as initial embeddings. * **init_emb_grad** (*bool, optional*) -- Optimize initial embeddings or not. * **lamb** (*float, optional*) -- Balances the contributions of the overall objective. (default: :obj:`4`) .. py:attribute:: node_num .. py:attribute:: in_dim :value: 64 .. py:attribute:: out_dim :value: 64 .. py:attribute:: lamb :value: 4 .. py:attribute:: device .. py:attribute:: pos_edge_index .. py:attribute:: neg_edge_index .. py:attribute:: x .. py:attribute:: conv1 .. py:attribute:: convs .. py:attribute:: weight .. py:attribute:: lsp_loss .. py:attribute:: structure_loss .. py:method:: reset_parameters() .. py:method:: loss() -> torch.FloatTensor .. py:method:: forward() -> torch.Tensor