From 1540cd03f6e06c6a48751287641021e091c663b5 Mon Sep 17 00:00:00 2001 From: Nataniel Ruiz Date: Wed, 25 Dec 2019 20:44:37 -0400 Subject: [PATCH] next --- cyclegan/test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cyclegan/test.py b/cyclegan/test.py index 2d7a899..a8a5ab5 100644 --- a/cyclegan/test.py +++ b/cyclegan/test.py @@ -66,7 +66,8 @@ if __name__ == '__main__': if i >= opt.num_test: # only apply our model to opt.num_test images. break model.set_input(data) # unpack data from data loader - model.forward_noattack() + with torch.no_grad(): + model.forward_noattack() input_adv, perturb = model.attack() with torch.no_grad(): model.forward_attack(perturb) @@ -85,7 +86,7 @@ if __name__ == '__main__': if i % 5 == 0: # save images to an HTML file print('processing (%04d)-th image... %s' % (i, img_path)) save_images(webpage, visuals, img_path, aspect_ratio=opt.aspect_ratio, width=opt.display_winsize) - time.sleep(0.5) + # time.sleep(0.5) webpage.save() # save the HTML