diff --git a/python/paddle/fluid/contrib/slim/tests/test_mkldnn_int8_quantization_strategy.py b/python/paddle/fluid/contrib/slim/tests/test_mkldnn_int8_quantization_strategy.py index 5f10b3281284403214dc1c43440008faa67fb667..01c8f893faf3f5cc3489d34d0c8f8fa158846497 100644 --- a/python/paddle/fluid/contrib/slim/tests/test_mkldnn_int8_quantization_strategy.py +++ b/python/paddle/fluid/contrib/slim/tests/test_mkldnn_int8_quantization_strategy.py @@ -129,7 +129,7 @@ class TestMKLDNNPostTrainingQuantStrategy(unittest.TestCase): top1 = 0.0 top5 = 0.0 total_samples = 0 - for _, data in enumerate(test_reader()): + for batch_id, data in enumerate(test_reader()): if six.PY2: images = map(lambda x: x[0].reshape(dshape), data) if six.PY3: @@ -146,6 +146,9 @@ class TestMKLDNNPostTrainingQuantStrategy(unittest.TestCase): top1 += np.sum(out[1]) * len(data) top5 += np.sum(out[2]) * len(data) total_samples += len(data) + if (batch_id + 1) % 100 == 0: + _logger.info('{} images have been predicted'.format( + total_samples)) return top1 / total_samples, top5 / total_samples def _warmup(self, reader=None, config_path=''):