From 4b957af2372c861942aa7193223d00f23a5a3318 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Sat, 17 Feb 2018 01:35:58 +0000 Subject: [PATCH] clean up --- .../v2/fluid/tests/book/test_recognize_digits.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/python/paddle/v2/fluid/tests/book/test_recognize_digits.py b/python/paddle/v2/fluid/tests/book/test_recognize_digits.py index 442cf9604..a0b4774da 100644 --- a/python/paddle/v2/fluid/tests/book/test_recognize_digits.py +++ b/python/paddle/v2/fluid/tests/book/test_recognize_digits.py @@ -155,7 +155,6 @@ def train(nn_type, use_cuda, parallel, save_dirname, save_param_filename): float(avg_loss_val), float(acc_val))) if math.isnan(float(avg_loss_val)): sys.exit("got NaN loss, training failed.") - exit(0) raise AssertionError("Loss of recognize digits is too large") @@ -231,14 +230,10 @@ def inject_test_method(use_cuda, parallel, nn_type, combine): def inject_all_tests(): - for use_cuda in [True]: - for parallel in [True]: - for nn_type in ['mlp']: + for use_cuda in (False, True): + for parallel in (False, True): + for nn_type in ('mlp', 'conv'): inject_test_method(use_cuda, parallel, nn_type, True) - # for use_cuda in (False, True): - # for parallel in (False, True): - # for nn_type in ('mlp', 'conv'): - # inject_test_method(use_cuda, parallel, nn_type, True) # One unit-test for saving parameters as separate files inject_test_method(False, False, 'mlp', False) -- GitLab