torch_geometric_signed_directed.nn.signed.SiGAT =============================================== .. py:module:: torch_geometric_signed_directed.nn.signed.SiGAT Classes ------- .. autoapisummary:: torch_geometric_signed_directed.nn.signed.SiGAT.SiGAT Module Contents --------------- .. py:class:: SiGAT(node_num: int, edge_index_s, in_dim: int = 20, out_dim: int = 20, init_emb: torch.FloatTensor = None, init_emb_grad: bool = True, **kwargs) Bases: :py:obj:`torch.nn.Module` The signed graph attention network model (SiGAT) from the `"Signed Graph Attention Networks" `_ paper. :Parameters: * **node_num** (*[type]*) -- Number of node. * **edge_index_s** (*list*) -- The edgelist with sign. (e.g., [[0, 1, -1]] ) * **in_dim** (*int, optional*) -- Size of each input sample features. Defaults to 20. * **out_dim** (*int*) -- Size of each output embeddings. Defaults to 20. * **init_emb** -- (FloatTensor, optional): The initial embeddings. Defaults to :obj:`None`, which will use TSVD as initial embeddings. * **init_emb_grad** (*bool optional*) -- Whether to set the initial embeddings to be trainable. (default: :obj:`False`) .. py:attribute:: in_dim :value: 20 .. py:attribute:: out_dim :value: 20 .. py:attribute:: node_num .. py:attribute:: device .. py:attribute:: pos_edge_index .. py:attribute:: neg_edge_index .. py:attribute:: x .. py:attribute:: adj_lists .. py:attribute:: edge_lists .. py:attribute:: aggs :value: [] .. py:attribute:: mlp_layer .. py:attribute:: lsp_loss .. py:method:: reset_parameters() .. py:method:: map_adj_to_edges(adj_list: List) -> torch.LongTensor .. py:method:: get_tri_features(u: int, v: int, r_edgelist: List) -> Tuple[int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int] .. py:method:: build_adj_lists(edge_index_s: torch.LongTensor) -> List .. py:method:: forward() -> torch.FloatTensor .. py:method:: loss() -> torch.FloatTensor