diff --git a/python/paddle/fluid/contrib/slim/tests/test_post_training_quantization_mobilenetv1.py b/python/paddle/fluid/contrib/slim/tests/test_post_training_quantization_mobilenetv1.py index 2e0d5ba9a03ec97cb394886af0f68355e9a856d5..5180723da46a2569484ad87b765cd4fc2881fbbe 100644 --- a/python/paddle/fluid/contrib/slim/tests/test_post_training_quantization_mobilenetv1.py +++ b/python/paddle/fluid/contrib/slim/tests/test_post_training_quantization_mobilenetv1.py @@ -133,9 +133,10 @@ class TestPostTrainingQuantization(unittest.TestCase): "small_data", False) # reader/decorator.py requires the relative path to the data folder - cmd = 'rm -rf {0} && ln -s {1} {0}'.format("data", - self.data_cache_folder) - os.system(cmd) + if not os.path.exists("./data/ILSVRC2012"): + cmd = 'rm -rf {0} && ln -s {1} {0}'.format("data", + self.data_cache_folder) + os.system(cmd) self.batch_size = 1 if os.environ.get('DATASET') == 'full' else 50 self.sample_iterations = 50 if os.environ.get(