Azure/counterfit

EXCEPTION of type 'AttributeError' occurred with message: 'list' object has no attribute 'shape'

lzomlot opened this issue · 3 comments

I installed Counterfit using Option 2. While I am going through 'Basic Use' example, I got this Exception. Any suggestions.

File "C:.....\Anaconda3\envs\counterfit\lib\site-packages\art\utils.py", line 534, in check_and_transform_label_format
if len(labels.shape) == 2 and labels.shape[1] > 1:
AttributeError: 'list' object has no attribute 'shape'
EXCEPTION of type 'AttributeError' occurred with message: 'list' object has no attribute 'shape'

Same problem, it seems that this problem happened when you assgin the attack name when use "scan" command. If you simply use "scan -n 3 --log", it will work. And the "use" and "run" command works for me, so I guess there might be some bugs in scan.py.
image
image

This is likely due to your target_output_classes not being a list, or the return of your predict function not being a list of lists.

The return of the predict function should be a list of lists, where each list is the same length as target_output_classes