THUYimingLi/BackdoorBox

Bug in example.py

TK12331 opened this issue · 3 comments

Traceback (most recent call last):
File "/home/objdet/Desktop/backdoor/BackdoorBox/example.py", line 66, in
badnets = core.BadNets(
TypeError: init() got an unexpected keyword argument 'poisoned_transform_index'

When I ran the code example.py, the above error was thrown out. And I have checked the code in core/attacks/BadNets, it does not have the argument poisoned_transform_index in function init().

Could you fix the bug?

Thanks.

I found that just commenting it out and using the default parameter works fine.

Traceback (most recent call last): File "/home/objdet/Desktop/backdoor/BackdoorBox/example.py", line 66, in badnets = core.BadNets( TypeError: init() got an unexpected keyword argument 'poisoned_transform_index'

When I ran the code example.py, the above error was thrown out. And I have checked the code in core/attacks/BadNets, it does not have the argument poisoned_transform_index in function init().

Could you fix the bug?

Thanks.

Hi, TK12331, thx for your attention to our toolbox! Firstly, this argument is included in base.py instead of BadNets.py where BadNets.py inherites somes function of base.py. Besides, I am deeply sorry that we forget to remove or update example.py since it is written based on our old version that could be changed.

Please use the example codes in test subfolder instead :)

I will turn off this issue If you don't have additional questions. Thanks again for using our toolbox!