From c0e57e578f4303810f170e472a30f82a158bafeb Mon Sep 17 00:00:00 2001 From: liuqi Date: Thu, 31 May 2018 19:04:50 +0800 Subject: [PATCH] Fix model_name check bugs. --- mace/examples/example.cc | 2 +- tools/converter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mace/examples/example.cc b/mace/examples/example.cc index c54f3c50..4569654e 100644 --- a/mace/examples/example.cc +++ b/mace/examples/example.cc @@ -183,7 +183,7 @@ bool RunModel(const std::vector &input_names, &engine); } else { create_engine_status = - CreateMaceEngineFromCode(model_name, + CreateMaceEngineFromCode(FLAGS_model_name, FLAGS_model_data_file, input_names, output_names, diff --git a/tools/converter.py b/tools/converter.py index ad135da8..09a51a0a 100644 --- a/tools/converter.py +++ b/tools/converter.py @@ -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, -- GitLab