You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: