Skip to content

Instantly share code, notes, and snippets.

@Paulescu
Created March 14, 2022 12:56
Show Gist options
  • Save Paulescu/a7f78d01fdf832efabcbc91a3c8e8dfe to your computer and use it in GitHub Desktop.
Save Paulescu/a7f78d01fdf832efabcbc91a3c8e8dfe to your computer and use it in GitHub Desktop.
for x_adv, grad in iterator:
# get model predictions
x_adv_predictions = predict(model, x_adv)
plot(x_original, x_adv, grad, epsilon,
x_label=x_predictions['label'],
x_prob=x_predictions['confidence'],
x_adv_label=x_adv_predictions['label'],
x_adv_prob=x_adv_predictions['confidence'])
# starting image new iteration
x_original = x_adv
x_predictions = predict(model, x_original)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment