advboxes / AdvBox

Advbox is a toolbox to generate adversarial examples that fool neural networks in PaddlePaddle、PyTorch、Caffe2、MxNet、Keras、TensorFlow and Advbox can benchmark the robustness of machine learning models. Advbox give a command line tool to generate adversarial examples with Zero-Coding.
Apache License 2.0
1.39k stars 265 forks source link

TypeError: Can't instantiate abstract class EOTB_attack with abstract methods interpret_output #60

Closed kqvd closed 4 years ago

kqvd commented 4 years ago

I'm trying to run the ODD code via attack_model.py, but I'm getting this error:

2020-09-18 07:24:08.108889: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 Traceback (most recent call last): File "attack_model.py", line 23, in main(sys.argv) File "attack_model.py", line 18, in main attack = EOTB_attack(YOLO_tiny_model_updated) TypeError: Can't instantiate abstract class EOTB_attack with abstract methods interpret_output

jayxio commented 4 years ago

Could you provide us with more info? like what was the command using then etc?

kqvd commented 4 years ago

"python attack_model.py -fromfile data_sampling -frommaskfile test/EOTB.xml"

I've tried running it on Google Colab and also Spyder from Anaconda.

jayxio commented 4 years ago

Could you try to delete the _ which is at the beginning of the EOTB_attack method, _interpret_output? It might be that the name is inconsistent with the name in (an abstractmethod) ODD_logic.

kqvd commented 4 years ago

Thanks, it's progressed now!

I'm not sure what happens here as the code stops in this line in basic_logic.py. Do I have to enter something or press a key?

Screenshot 2020-09-18 193511

Screenshot 2020-09-18 193543

kqvd commented 4 years ago

Nevermind, I need to comment out the pdb.set_trace()