Spaces:
Sleeping
Sleeping
Commit
·
a5a58a3
1
Parent(s):
db0cb98
Update app.py
Browse files
app.py
CHANGED
@@ -56,8 +56,6 @@ def pgd(X, model, eps=0.1, step_size=0.015, iters=40, clamp_min=0, clamp_max=1,
|
|
56 |
|
57 |
if mask is not None:
|
58 |
X_adv.data *= mask
|
59 |
-
|
60 |
-
torch.cuda.empty_cache()
|
61 |
|
62 |
return X_adv
|
63 |
|
@@ -81,8 +79,6 @@ def pgd_inpaint(X, target, model, criterion, eps=0.1, step_size=0.015, iters=40,
|
|
81 |
|
82 |
if mask is not None:
|
83 |
X_adv.data *= mask
|
84 |
-
|
85 |
-
torch.cuda.empty_cache()
|
86 |
|
87 |
return X_adv
|
88 |
|
|
|
56 |
|
57 |
if mask is not None:
|
58 |
X_adv.data *= mask
|
|
|
|
|
59 |
|
60 |
return X_adv
|
61 |
|
|
|
79 |
|
80 |
if mask is not None:
|
81 |
X_adv.data *= mask
|
|
|
|
|
82 |
|
83 |
return X_adv
|
84 |
|