Benchmarking Inception_V3
Analyzing the performance on any ML model is very crucial . while running ML model on device we need to know the performance of the ml model executed on the edge device . so that we can get the performance metrices of the different layers of ML model and some other usefull insights of different runtimes
Running Benchmarks for Inception_V3
Pre-requisite :
- your_model.dlc
- A text file listing all the input data. For an example, see: $SNPE_ROOT/models/alexnet/data/image_list.txt.
- All the input data listed in the text file. For an example, see $SNPE_ROOT/models/alexnet/data/cropped.
$cd $SNPE_ROOT/benchmark
$cp alexnet_sample.json inception_v3.json
$vi inception_v3.json
// modify the inception_v3.json parameters according to inception_v3
{
"Name":"inceptionV3",
"HostRootPath": "inception_v3",
"HostResultsDir":"inception_v3/results",
"DevicePath":"/data/local/tmp/snpeexample",
"Devices":["2d07d8f9"],
"HostName": "localhost",
"Runs":5,
"Model": {
"Name": "Inception_v3",
"Dlc":
"$SNPE_ROOT/models/inception_v3/dlc/inception_v3_quantized.dlc",
"InputList":
"$SNPE_ROOT/models/inception_v3/data/target_raw_list.txt",
"Data": [
"$SNPE_ROOT/models/inception_v3/data/cropped"
]
},
"Runtimes":["GPU", "CPU", "DSP"],
"Measurements": ["timing"]
}
Run the benchmark for Inception_v3
run the following command to run on the only device connected to your computer
- $cd $SNPE_ROOT/benchmarks
- $python snpe_bench.py -c inception_v3.json
View the results
A latest_results link that points to the most recent run is created.
# In inception_v3.json, "HostResultDir" is set to "inception_v3/results"
- cd $SNPE_ROOT/benchmarks/inception_v3/results
# Notice the time stamped directories and the "latest_results" link.
- cd $SNPE_ROOT/benchmarks/inception_v3/results/latest_results
# Notice the .csv file, open this file in a csv viewer (Excel, LibreOffice Calc)
Comments
Post a Comment