Spaces:
Runtime error
Runtime error
dalexanderch
commited on
Commit
•
b0e5419
1
Parent(s):
b53d14a
Update app.py
Browse files
app.py
CHANGED
@@ -135,7 +135,7 @@ def fn(dataset, attack):
|
|
135 |
pred1 = np.argmax(label1)
|
136 |
if attack == "FGSM":
|
137 |
image2 = fgsm_mnist(image1, label1, model_mnist, epsilon)
|
138 |
-
elif attack == "
|
139 |
image2 = iterative_fgsm_mnist(image1, label1, model_mnist, epsilon, alpha, niter)
|
140 |
else:
|
141 |
image2 = iterative_least_likely_fgsm_mnist(image1, model_mnist, epsilon, alpha, niter, nb_classes)
|
@@ -150,7 +150,7 @@ def fn(dataset, attack):
|
|
150 |
pred1 = classes[np.argmax(label1)]
|
151 |
if attack == "FGSM":
|
152 |
image2 = fgsm_cifar10(image1, label1, model_cifar10, epsilon)
|
153 |
-
elif attack == "
|
154 |
image2 = iterative_fgsm_cifar10(image1, label1, model_cifar10, epsilon, alpha, niter)
|
155 |
else:
|
156 |
image2 = iterative_least_likely_fgsm_cifar10(image1, model_cifar10, epsilon, alpha, niter, nb_classes)
|
|
|
135 |
pred1 = np.argmax(label1)
|
136 |
if attack == "FGSM":
|
137 |
image2 = fgsm_mnist(image1, label1, model_mnist, epsilon)
|
138 |
+
elif attack == "I-FGSM":
|
139 |
image2 = iterative_fgsm_mnist(image1, label1, model_mnist, epsilon, alpha, niter)
|
140 |
else:
|
141 |
image2 = iterative_least_likely_fgsm_mnist(image1, model_mnist, epsilon, alpha, niter, nb_classes)
|
|
|
150 |
pred1 = classes[np.argmax(label1)]
|
151 |
if attack == "FGSM":
|
152 |
image2 = fgsm_cifar10(image1, label1, model_cifar10, epsilon)
|
153 |
+
elif attack == "I-FGSM":
|
154 |
image2 = iterative_fgsm_cifar10(image1, label1, model_cifar10, epsilon, alpha, niter)
|
155 |
else:
|
156 |
image2 = iterative_least_likely_fgsm_cifar10(image1, model_cifar10, epsilon, alpha, niter, nb_classes)
|