提交 c0e57e57 编写于 作者: L liuqi

Fix model_name check bugs.

上级 8619928b
......@@ -183,7 +183,7 @@ bool RunModel(const std::vector<std::string> &input_names,
&engine);
} else {
create_engine_status =
CreateMaceEngineFromCode(model_name,
CreateMaceEngineFromCode(FLAGS_model_name,
FLAGS_model_data_file,
input_names,
output_names,
......
......@@ -279,7 +279,7 @@ def format_model_config(config_file_path):
mace_check(len(model_names) > 0, ModuleName.YAML_CONFIG,
"no model found in config file")
model_name_reg = re.compile(r'^[a-z0-9_]+$')
model_name_reg = re.compile(r'^[a-zA-Z0-9_]+$')
for model_name in model_names:
# check model_name legality
mace_check(model_name not in CPP_KEYWORDS,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册