|
Algorithm 1 uses PGD attack method to generate AE |
| Input: |
Cover image , the parameters of pre-trained target classification network, the maximum iterations T, the perturbation step size , and the maximum perturbation range S
|
| Output: |
Adversarial example IA
|
| 1: |
//The initial adversarial example is the cover image. |
| 2: |
for do
|
| 3: |
//Get the gradient at the current iteration exampl. |
| 4: |
//Get the perturbation magnitude at the current iteration. |
| 5: |
if then
|
| 6: |
//Update the perturbed image |
| 7: |
Else
|
| 8: |
//Confine the perturbations to the range |
| 9: |
end if
|
| 10: |
end for |
| 11: |
|