Created by: qingqing01
Fix #6008 (closed)
For the convenience of profiling, we need to add benchmark mode and running scripts.
- Add typical network ResNet for the benchmark.
- Use dataset Flowers-102 instead of CIAR. Since data shape of former is (3, 224, 224), and the latter is (3, 28, 28). The former data shape is more typical.
- After run
python benchmark_convnet_model.py
, some time info will be printed out.
The usage is:
optional arguments:
-h, --help show this help message and exit
--model MODEL The model architecture: (resnet).
--batch_size BATCH_SIZE
The minibatch size.
--iterations ITERATIONS
The number of minibatches.
--pass_num PASS_NUM The number of minibatches.
--order ORDER The data order: (NCHW, NHWC).
--device DEVICE The data order: (GPU, CPU).
--infer_only If set, run forward only.
--use_cprof If set, use cProfile.
--use_nvprof If set, use nvprof for CUDA.