This commit is contained in:
Nataniel Ruiz
2019-12-25 20:35:23 -04:00
parent cf0510d147
commit 1102475fe3
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -78,6 +78,8 @@ class TestModel(BaseModel):
black = np.zeros((1, 3, image.size(2), image.size(3)))
black = torch.FloatTensor(black).cuda()
input_adv, perturb = pgd_attack.perturb(image, black)
black = None
return input_adv, perturb
+2 -1
View File
@@ -88,7 +88,8 @@ if __name__ == '__main__':
model.fake = None
model.real = None
model.fake_noattack = None
data = None
webpage.save() # save the HTML