From 1e8893cacb901968f3f2c02806338e0613163056 Mon Sep 17 00:00:00 2001 From: Shawn-Shan Date: Fri, 24 Jul 2020 11:11:42 -0500 Subject: [PATCH] bug fixes --- fawkes/differentiator.py | 1 - fawkes/protection.py | 6 +++--- setup.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/fawkes/differentiator.py b/fawkes/differentiator.py index 3ead798..6f1731e 100644 --- a/fawkes/differentiator.py +++ b/fawkes/differentiator.py @@ -407,7 +407,6 @@ class FawkesMaskGeneration: if iteration != 0 and iteration % (self.MAX_ITERATIONS // 3) == 0: LR = LR * 0.8 - print("LR: {}".format(LR)) if iteration % (self.MAX_ITERATIONS // 5) == 0: if self.verbose == 1: diff --git a/fawkes/protection.py b/fawkes/protection.py index 09430a9..8bf1f22 100644 --- a/fawkes/protection.py +++ b/fawkes/protection.py @@ -81,8 +81,8 @@ class Fawkes(object): print("Please enable GPU for ultra setting...") sys.exit(1) th = 0.01 - max_step = 200 - lr = 20 + max_step = 1000 + lr = 10 else: raise Exception("mode must be one of 'low', 'mid', 'high', 'ultra', 'custom'") return th, max_step, lr @@ -179,7 +179,7 @@ def main(*argv): default="high_extract") parser.add_argument('--th', type=float, default=0.01) - parser.add_argument('--max-step', type=int, default=500) + parser.add_argument('--max-step', type=int, default=1000) parser.add_argument('--sd', type=int, default=1e9) parser.add_argument('--lr', type=float, default=2) diff --git a/setup.py b/setup.py index 6a61608..84d5a94 100644 --- a/setup.py +++ b/setup.py @@ -77,7 +77,7 @@ setup_requires = [] install_requires = [ 'numpy==1.16.4', # 'tensorflow-gpu>=1.13.1, <=1.14.0', - 'tensorflow>=1.12.0, <=1.15.0', # change this is tensorflow-gpu if using GPU machine. + 'tensorflow>=1.12.0, <=1.15.0', # change this is tensorflow-gpu if using GPU machine. 'argparse', 'keras>=2.2.5, <=2.3.1', 'scikit-image',