AdvBox icon indicating copy to clipboard operation
AdvBox copied to clipboard

error in running imagenet_example_cw.py

Open amirhamidihd opened this issue 5 years ago • 1 comments

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.

amirhamidihd avatar Dec 08 '20 19:12 amirhamidihd

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

helen88 avatar Dec 17 '20 05:12 helen88