THUDM / CogDL

CogDL: A Comprehensive Library for Graph Deep Learning (WWW 2023)

Home Page:https://cogdl.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grb的bug

shanzhiq opened this issue · comments

from cogdl.attack.injection import FGSM
from cogdl.utils.grb_utils import GCNAdjNorm
attack = FGSM(epsilon=0.01,
n_epoch=1000,
n_inject_max=100,
n_edge_max=200,
feat_lim_min=-1,
feat_lim_max=1,
device=device)
graph_attack = attack.attack(model=model_sur,
graph=graph,
adj_norm_func=GCNAdjNorm)

当运行grb攻击的实例代码的attack方法,处会爆出错误row not found, 似乎需要在injection的地方把adj_attack执行to_coo(),才可以使用adj.row功能

cogdl 0.5.3
torch 1.11.0
torch-cluster 1.6.0
torch-geometric 2.0.4
torch-geometric-signed-directed 0.8.0
torch-scatter 2.0.9
torch-sparse 0.6.14
torch-spline-conv 1.2.1
scikit-image 0.19.3
scikit-learn 1.1.1
scipy 1.8.1