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.38k stars 263 forks source link

error in running imagenet_example_cw.py #67

Open amirhamidihd opened 3 years ago

amirhamidihd commented 3 years ago

I want to run imagene_example_cw.py, I haven't changed any thing in the source code, but I see this error: AssertionError: The loss.shape should be (1L,), but the current loss.shape is (-1L, 1L). Maybe that you should call fluid.layers.mean to process the current loss.

what should I do? Thanks.

helen88 commented 3 years ago

Hi, @amirhamidihd this problem caused, because your numpy version >=1.17, please use lower version, 1.16 and lower is ok. please try. image image