Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Mr.Vain
Mace
提交
682ffb58
Mace
项目概览
Mr.Vain
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
682ffb58
编写于
3月 29, 2018
作者:
L
liuqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove skip_validation flag and add validation_inputs_data flag
上级
33b049e6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
4 addition
and
6 deletion
+4
-6
tools/example.yaml
tools/example.yaml
+2
-0
tools/mace_tools.py
tools/mace_tools.py
+2
-6
未找到文件。
tools/example.yaml
浏览文件 @
682ffb58
...
...
@@ -20,6 +20,8 @@ models:
dsp_mode
:
0
obfuscate
:
1
fast_conv
:
0
validation_inputs_data
:
-
path/to/input_files
capture_net
:
platform
:
caffe
model_file_path
:
path/to/model.prototxt
...
...
tools/mace_tools.py
浏览文件 @
682ffb58
...
...
@@ -96,7 +96,6 @@ def generate_random_input(target_soc, model_output_dir,
input_file_list
[
i
].
startswith
(
"https://"
):
urllib
.
urlretrieve
(
input_file_list
[
i
],
dst_input_file
)
else
:
print
'Copy input data:'
,
dst_input_file
shutil
.
copy
(
input_file_list
[
i
],
dst_input_file
)
def
generate_model_code
():
...
...
@@ -294,10 +293,8 @@ def main(unused_args):
# Transfer params by environment
os
.
environ
[
"MODEL_TAG"
]
=
model_name
print
'======================='
,
model_name
,
'======================='
skip_validation
=
configs
[
"models"
][
model_name
].
get
(
"skip_validation"
,
0
)
model_config
=
configs
[
"models"
][
model_name
]
input_file_list
=
model_config
.
get
(
"
input_files
"
,
[])
input_file_list
=
model_config
.
get
(
"
validation_inputs_data
"
,
[])
for
key
in
model_config
:
if
key
in
[
'input_nodes'
,
'output_nodes'
]
and
isinstance
(
model_config
[
key
],
list
):
...
...
@@ -357,8 +354,7 @@ def main(unused_args):
if
FLAGS
.
mode
==
"benchmark"
:
benchmark_model
(
target_soc
,
model_output_dir
,
option_args
)
if
FLAGS
.
mode
==
"validate"
or
(
FLAGS
.
mode
==
"all"
and
skip_validation
==
0
):
if
FLAGS
.
mode
==
"validate"
or
FLAGS
.
mode
==
"all"
:
validate_model
(
target_soc
,
model_output_dir
)
if
FLAGS
.
mode
==
"build"
or
FLAGS
.
mode
==
"merge"
or
FLAGS
.
mode
==
"all"
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录