Open PolarisRisingWar opened 3 years ago
Hi,
Nettack can only deal with binary and sparse features/structure perturbation but in ogbn-arxiv the features are continuous and dense. That is why it fails. You may want to set attack_features=False
to avoid the problem (although you may still want to attack the features).
Another solution is to use SGAttack
instead of Nettack
. See test_sga.py for more details. Now it does not support attack_features=True
but @EdisonLeeeee is working on it and will finish it in several days.
Thank you for your answer! I manully changed feature matrix to sparse matrix, and it can run, but it's too slow that I don't even know if I have other problems. So I changed dataset to cora and it worked.
Honestly I have a homework to do, so it seems that I need to use Nettack. So I wonder how could I accelerate my training?
For example, graph too big to attack just use attack_features=False
? Are there any ways for me to decide how big a graph is too big (For example I need to train for more than 30 min?) ?
Besides, can I use other cuda device rather than only using cuda:0
? I met the problem that can't convert to cuda:1
and this is my issue about that problem. I want to use several scripts to run codes so maybe some dataset can get results more quickly. But I met this problem: #86
And I wonder if the feature is not binary and sparse, is convert it to sparse matrix (maybe not binary) useful? Or I have to use binary and sparse matrix?
This is my code:
And this is the error message:
I wonder how could I handle with this problem?
It's hard for me to directly download the example data of DeepRobust coz in China mainland it's hard to download directly from
https://raw.githubusercontent.com
domain name. So I wanna use PyG dataset and transfer it to DeepRobust dataset. But it causes this problem. My DeepRobust packagel was downloaded by pip, cause when downloading by git it occurred some strange bugs. My Python verison is 3.9.7, on Unbuntu cloud server. This is part of my pip list which I think may be relative to this problem: deeprobust 0.2.2 gensim 3.8.3 networkx 2.6.3 numba 0.54.1 numpy 1.20.3 ogb 1.3.2 pandas 1.3.4 pip 21.2.4 scikit-learn 1.0.1 scipy 1.7.1 tensorboardX 2.4 torch 1.10.0 torch-geometric 2.0.1 torch-scatter 2.0.9 torch-sparse 0.6.12