SSA icon indicating copy to clipboard operation
SSA copied to clipboard

about gt and Truelabel

Open yrj1409 opened this issue 2 years ago • 1 comments

it seems that "gt=img_obj['TrueLabel'] - 1"

But why use gt in "attack.py" to generate adversarial examples but use gt+1 in "verify.py" to get accuracy?

attack.py

loss = F.cross_entropy(output_v3, gt)

verify.py

sum += (model(images)[0].argmax(1) != (gt+1)).detach().sum().cpu()

yrj1409 avatar Oct 17 '22 09:10 yrj1409