Skip to content
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

Is that possible apply WaNet attack on ImageNet? #7

Open
chengyi-chris opened this issue Jun 5, 2024 · 0 comments
Open

Is that possible apply WaNet attack on ImageNet? #7

chengyi-chris opened this issue Jun 5, 2024 · 0 comments

Comments

@chengyi-chris
Copy link

Thank you for your impressive work. I would like to ask for details on how to apply WaNet to the ImageNet dataset (similar to the CIFAR10 setting). How can I modify the code accordingly? The code create_poisoned_set_imagenet.py generates the following error message:

'''
File "/work/u1056911/backdoor-toolbox/poison_tool_box/WaNet.py", line 127, in transform
data = F.grid_sample(data, grid_temps.repeat(data.shape[0], 1, 1, 1), align_corners=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/u1056911/.local/lib/python3.11/site-packages/torch/nn/functional.py", line 4304, in grid_sample
return torch.grid_sampler(input, grid, mode_enum, padding_mode_enum, align_corners)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: grid_sampler(): expected grid to have size 1 in last dimension, but got grid with sizes [3, 224, 224, 2]
'''
Do you know what the problem might be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant