as791 / Adversarial-Example-Attack-and-Defense

This repository contains the implementation of three adversarial example attack methods FGSM, IFGSM, MI-FGSM and one Distillation as defense against all attacks using MNIST dataset.
121 stars 27 forks source link

converting target labels to soft labels #2

Open bigpigboomboomboom opened 1 year ago

bigpigboomboomboom commented 1 year ago

the code :

converting target labels to soft labels

for data in train_loader: input, label = data[0].to(device),data[1].to(device) softlabel = F.log_softmax(modelF(input),dim=1) data[1] = softlabel it seem does not convert target labels to soft labels , the label doesn't change in the code that follows