ain-soph / trojanzoo

TrojanZoo provides a universal pytorch platform to conduct security researches (especially backdoor attacks/defenses) of image classification in deep learning.
https://ain-soph.github.io/trojanzoo
GNU General Public License v3.0
281 stars 63 forks source link

[Error] When I test Neural Cleanse i got a error #174

Closed Ghifan closed 2 years ago

Ghifan commented 2 years ago

I first git clone git clone https://github.com/ain-soph/trojanzoo.git

and run python ./examples/backdoor_defense.py --color --verbose 1 --pretrained --validate_interval 1 --dataset cifar10 --model resnet18_comp --attack badnet --defense neural_cleanse --mark_random_init --epochs 50 --lr 0.01

then i got the error:TypeError: unsupported operand type(s) for |: '_SpecialForm' and 'types.GenericAlias'

btw my python version is 3.8 should i change it to 3.1?

ain-soph commented 2 years ago

Yes, you should. Type annotation requires 3.9 and match clause requires 3.10

Ghifan commented 2 years ago

ok,thank you