diff --git a/example/mnist_demo/lenet5_mnist_fuzzing.py b/example/mnist_demo/lenet5_mnist_fuzzing.py index 4adcbbd64f627b6667d7fddf17e8f771d0418498..77f7da51efb47fc871323062be3f5297ebfadad3 100644 --- a/example/mnist_demo/lenet5_mnist_fuzzing.py +++ b/example/mnist_demo/lenet5_mnist_fuzzing.py @@ -41,7 +41,7 @@ def test_lenet_mnist_fuzzing(): model = Model(net) # get training data - data_list = "./MNIST_datasets/train" + data_list = "./MNIST_unzip/train" batch_size = 32 ds = generate_mnist_dataset(data_list, batch_size, sparse=True) train_images = [] @@ -55,7 +55,7 @@ def test_lenet_mnist_fuzzing(): # fuzz test with original test data # get test data - data_list = "./MNIST_datasets/test" + data_list = "./MNIST_unzip/test" batch_size = 32 ds = generate_mnist_dataset(data_list, batch_size, sparse=True) test_images = [] diff --git a/tests/ut/python/defenses/test_ad.py b/tests/ut/python/defenses/test_ad.py index 78b581ad4c0f9722c5ca2fbf1a6087952df5d78c..0a3015f6419334232fd6852e2b64e349a40475ef 100644 --- a/tests/ut/python/defenses/test_ad.py +++ b/tests/ut/python/defenses/test_ad.py @@ -39,7 +39,7 @@ TAG = 'Ad_Test' def test_ad(): """UT for adversarial defense.""" num_classes = 10 - batch_size = 16 + batch_size = 32 sparse = False context.set_context(mode=context.GRAPH_MODE) diff --git a/tests/ut/python/defenses/test_ead.py b/tests/ut/python/defenses/test_ead.py index 9eeac213f1a9ff3c151486b120739a3aa4c371a2..f44cc412bd35bff87f511b7d95d2f99c79fd5c5d 100644 --- a/tests/ut/python/defenses/test_ead.py +++ b/tests/ut/python/defenses/test_ead.py @@ -41,7 +41,7 @@ TAG = 'Ead_Test' def test_ead(): """UT for ensemble adversarial defense.""" num_classes = 10 - batch_size = 16 + batch_size = 64 sparse = False context.set_context(mode=context.GRAPH_MODE) @@ -53,7 +53,7 @@ def test_ead(): if not sparse: labels = np.eye(num_classes)[labels].astype(np.float32) - net = SimpleNet() + net = Net() loss_fn = nn.SoftmaxCrossEntropyWithLogits(is_grad=False, sparse=sparse) optimizer = Momentum(net.trainable_params(), 0.001, 0.9) diff --git a/tests/ut/python/defenses/test_nad.py b/tests/ut/python/defenses/test_nad.py index 938a4e53ef76460da57ed18357ab0f296ca5465d..f0d89812c8b03cf54e61a772c0c121fb2ca567e8 100644 --- a/tests/ut/python/defenses/test_nad.py +++ b/tests/ut/python/defenses/test_nad.py @@ -39,7 +39,7 @@ TAG = 'Nad_Test' def test_nad(): """UT for natural adversarial defense.""" num_classes = 10 - batch_size = 16 + batch_size = 32 sparse = False context.set_context(mode=context.GRAPH_MODE) diff --git a/tests/ut/python/defenses/test_pad.py b/tests/ut/python/defenses/test_pad.py index 79080954e2004582d3abbc4de05a414bd6d6ab32..e92d7cef6a03edb828ba77fb2e770207961a7bea 100644 --- a/tests/ut/python/defenses/test_pad.py +++ b/tests/ut/python/defenses/test_pad.py @@ -39,7 +39,7 @@ TAG = 'Pad_Test' def test_pad(): """UT for projected adversarial defense.""" num_classes = 10 - batch_size = 16 + batch_size = 32 sparse = False context.set_context(mode=context.GRAPH_MODE)