Skip to content

Instantly share code, notes, and snippets.

@Paulescu
Created Mar 14, 2022
Embed
What would you like to do?
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