diff --git a/benchmark/paddle/image/alexnet.py b/benchmark/paddle/image/alexnet.py index 10db1944856b75009f0224fa409de50614d0acad..b0beef8ca71fb6ea323994e1243b20888876e3f0 100644 --- a/benchmark/paddle/image/alexnet.py +++ b/benchmark/paddle/image/alexnet.py @@ -7,8 +7,17 @@ width = 227 num_class = 1000 batch_size = get_config_arg('batch_size', int, 128) use_mkldnn = get_config_arg('use_mkldnn', bool, False) +is_infer = get_config_arg("is_infer", bool, False) +num_samples = get_config_arg('num_samples', int, 2560) -args = {'height': height, 'width': width, 'color': True, 'num_class': num_class} +args = { + 'height': height, + 'width': width, + 'color': True, + 'num_class': num_class, + 'is_infer': is_infer, + 'num_samples': num_samples +} define_py_data_sources2( "train.list", None, module="provider", obj="process", args=args) diff --git a/benchmark/paddle/image/run_mkl_infer.sh b/benchmark/paddle/image/run_mkl_infer.sh index d795bcab1b7d098295066f79189d17e8299d28fb..00942e32a558087b891c984507ef99b48228fed6 100755 --- a/benchmark/paddle/image/run_mkl_infer.sh +++ b/benchmark/paddle/image/run_mkl_infer.sh @@ -79,6 +79,7 @@ fi # inference benchmark for use_mkldnn in True False; do for batchsize in 1 2 4 8 16; do + infer alexnet group2 $batchsize $use_mkldnn infer googlenet v1 $batchsize $use_mkldnn infer resnet 50 $batchsize $use_mkldnn infer vgg 19 $batchsize $use_mkldnn diff --git a/benchmark/paddle/image/run_openblas_infer.sh b/benchmark/paddle/image/run_openblas_infer.sh index c1001d3a7c95a293d0b2b5b78fb7415e167b3e9f..3dad42ee0dfac50bbed93a474348c45b856e9c3d 100755 --- a/benchmark/paddle/image/run_openblas_infer.sh +++ b/benchmark/paddle/image/run_openblas_infer.sh @@ -56,6 +56,7 @@ fi # inference benchmark for batchsize in 1 2 4 8 16; do + infer alexnet group2 $batchsize $use_mkldnn infer googlenet v1 $batchsize infer resnet 50 $batchsize infer vgg 19 $batchsize