MCPcopy
hub / github.com/THUDM/CogDL / attack

Method attack

examples/GRB/attack/base.py:14–28  ·  view source on GitHub ↗

r""" Parameters ---------- model : torch.nn.module Model implemented based on ``torch.nn.module``. adj : scipy.sparse.csr.csr_matrix Adjacency matrix in form of ``N * N`` sparse matrix. features : torch.FloatTensor Features

(self, model, adj, features, **kwargs)

Source from the content-addressed store, hash-verified

12
13 @abstractmethod
14 def attack(self, model, adj, features, **kwargs):
15 r"""
16
17 Parameters
18 ----------
19 model : torch.nn.module
20 Model implemented based on ``torch.nn.module``.
21 adj : scipy.sparse.csr.csr_matrix
22 Adjacency matrix in form of ``N * N`` sparse matrix.
23 features : torch.FloatTensor
24 Features in form of ``N * D`` torch float tensor.
25 kwargs :
26 Keyword-only arguments.
27
28 """
29
30
31class ModificationAttack(Attack):

Calls

no outgoing calls