diff --git a/mace/examples/example.cc b/mace/examples/example.cc index c54f3c504af23413488a648a0f08534bdf3f32d4..4569654e529b363da622758314a121290cce28a5 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 ad135da872f137a6baf8154388bf34d3b2338c88..09a51a0ae9e9284359577364701a08b81ece69ab 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,