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 19b93a66f4799ffae069e2a8be66931daef6d968..ac7ef4046f9ff55c2cbfc28b50784b9bffb80d53 100644 --- a/python/paddle/v2/fluid/tests/book/test_recognize_digits.py +++ b/python/paddle/v2/fluid/tests/book/test_recognize_digits.py @@ -122,11 +122,9 @@ def main(): PASS_NUM = 100 for pass_id in range(PASS_NUM): for batch_id, data in enumerate(train_reader()): - need_check = (batch_id + 1) % 10 == 0 - # train a mini-batch, fetch nothing exe.run(feed=feeder.feed(data)) - if need_check: + if (batch_id + 1) % 10 == 0: acc_set = [] avg_loss_set = [] for test_data in test_reader():