DSE-MSU / DeepRobust

A pytorch adversarial library for attack and defense methods on images and graphs
MIT License
995 stars 192 forks source link

Potential bug: missing axis parameter #70

Closed mle-els closed 3 years ago

mle-els commented 3 years ago

The argmax call might need axis=1 to select the largest logit per example:

    secondlargest = np.argmax((logits.double() * secondlargest_mask).cpu().detach().numpy())

https://github.com/DSE-MSU/DeepRobust/blob/master/deeprobust/image/attack/cw.py#L209

YaxinLi0-0 commented 3 years ago

Thank you for kindly show us the potential bug, I have updated the file.