Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
ae6f9524
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ae6f9524
编写于
8月 07, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 07, 2020
浏览文件
操作
浏览文件
下载
差异文件
!4080 add new nets for benchmark
Merge pull request !4080 from andy_wangrui/master
上级
6123476f
2fe3b7be
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
36 deletion
+10
-36
mindspore/lite/test/run_benchmark_nets.sh
mindspore/lite/test/run_benchmark_nets.sh
+10
-36
未找到文件。
mindspore/lite/test/run_benchmark_nets.sh
浏览文件 @
ae6f9524
...
...
@@ -43,18 +43,13 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib/:./third_party/protobuf/lib
#convert the models
cd
$convertor_path
/MSLite-
*
-linux_x86_64
#model1:
./converter_lite
--fmk
=
CAFFE
--modelFile
=
$models_path
/test.prototxt
--outputFile
=
$models_path
/test
--weightFile
=
$models_path
/test.caffemodel
#model2:
./converter_lite
--fmk
=
TFLITE
--modelFile
=
$models_path
/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.tflite
--outputFile
=
$models_path
/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite
./converter_lite
--fmk
=
TFLITE
--modelFile
=
$models_path
/hiai_cn_recognize_modify_padv2.tflite
--outputFile
=
$models_path
/hiai_cn_recognize_modify_padv2
models_config_filename
=
/home/workspace/mindspore_dataset/mslite/models/models_config.txt
./converter_lite
--fmk
=
TFLITE
--modelFile
=
$models_path
/hiai_detect_curve_model_float32.tflite
--outputFile
=
$models_path
/hiai_detect_curve_model_float32
./converter_lite
--fmk
=
TFLITE
--modelFile
=
$models_path
/hiai_detectmodel_desnet_256_128_64_32.tflite
--outputFile
=
$models_path
/hiai_detectmodel_desnet_256_128_64_32
./converter_lite
--fmk
=
TFLITE
--modelFile
=
$models_path
/mobilenet_v2_1_0_224.tflite
--outputFile
=
$models_path
/mobilenet_v2_1_0_224
while
read
line
;
do
model_name
=
$line
./converter_lite
--fmk
=
TFLITE
--modelFile
=
$models_path
/
${
model_name
}
--outputFile
=
$models_path
/
${
model_name
}
done
<
${
models_config_filename
}
#push to the arm and run benchmark:
...
...
@@ -65,11 +60,6 @@ cp $arm_path/MSLite-0.6.0-linux_arm64/benchmark/benchmark ./benchmark_test/benc
#copy the models:
cp
$models_path
/
*
.ms ./benchmark_test/
#model1:
#cp $models_path/test.ms ./benchmark_test/
#model2:
#cp $models_path/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.ms ./benchmark_test/
#cp $models_path/mobilenet_v2_1.0_224.tflite.ms ./benchmark_test/
#second:adb push to the phone
adb
-s
$device_id
push ./benchmark_test /data/local/tmp/
...
...
@@ -78,27 +68,11 @@ adb -s $device_id push ./benchmark_test /data/local/tmp/
echo
'cd /data/local/tmp/benchmark_test'
>
adb_cmd.txt
echo
'cp /data/local/tmp/libc++_shared.so ./'
>>
adb_cmd.txt
echo
'chmod 777 benchmark'
>>
adb_cmd.txt
#model1:
echo
'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=test.ms'
>>
adb_cmd.txt
#model2:
#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.ms' >> adb_cmd.txt
echo
'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.ms --inDataPath=/data/local/tmp/input_output/input/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.tflite.ms.bin --calibDataPath=/data/local/tmp/input_output/output/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.tflite.ms.out'
>>
adb_cmd.txt
#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_cn_recognize_modify_padv2.ms' >> adb_cmd.txt
echo
'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_cn_recognize_modify_padv2.ms --inDataPath=/data/local/tmp/input_output/input/hiai_cn_recognize_modify_padv2.tflite.ms.bin --calibDataPath=/data/local/tmp/input_output/output/hiai_cn_recognize_modify_padv2.tflite.ms.out'
>>
adb_cmd.txt
#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_detect_curve_model_float32.ms' >> adb_cmd.txt
#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_detectmodel_desnet_256_128_64_32.ms' >> adb_cmd.txt
#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=mobilenet_v2_1_0_224.ms' >> adb_cmd.txt
echo
'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=mobilenet_v2_1_0_224.ms --inDataPath=/data/local/tmp/input_output/input/mobilenet_v2_1.0_224.tflite.ms.bin --calibDataPath=/data/local/tmp/input_output/output/mobilenet_v2_1.0_224.tflite.ms.out'
>>
adb_cmd.txt
#run models:
while
read
line
;
do
model_name
=
$line
echo
'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath='
${
model_name
}
'.ms --inDataPath=/data/local/tmp/input_output/input/'
${
model_name
}
'.ms.bin --calibDataPath=/data/local/tmp/input_output/output/'
${
model_name
}
'.ms.out --warmUpLoopCount=1 --loopCount=1'
>>
adb_cmd.txt
done
<
${
models_config_filename
}
adb
-s
$device_id
shell < adb_cmd.txt
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录