-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How targeted_attack attack a subset of nodes? #134
Comments
Hey, you may take a look here: test_nettack.py. It shows how to perform targeted attack on target nodes. |
Thank you so much for your quick response!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! I have encountered a problem while using DeepRobust (Nettack) to attack the Cora dataset. I have noticed that in the Nettack API, the target_node argument should be an integer. How can I modify this API to attack a list of nodes instead?
target_node = 0
model = Nettack(surrogate, nnodes=adj.shape[0], attack_structure=True, attack_features=True, device='cpu').to('cpu')
model.attack(features, adj, labels, target_node, n_perturbations=5)
The text was updated successfully, but these errors were encountered: