提交 999e5ede 编写于 作者: 李寅

Fix mace tool interface bugs

上级 f2f05c0d
......@@ -146,6 +146,12 @@ model_tests:
python tools/converter.py convert --config=${CONF_FILE} --target_socs=$TARGET_SOCS --model_graph_format=file --model_data_format=file || exit 1;
python tools/converter.py run --config=${CONF_FILE} --target_socs=$TARGET_SOCS --round=1 --validate --model_graph_format=file --model_data_format=file || exit 1;
python tools/converter.py run --config=${CONF_FILE} --target_socs=$TARGET_SOCS --example --round=1 --validate --model_graph_format=file --model_data_format=file || exit 1;
python tools/converter.py benchmark --config=${CONF_FILE} --target_socs=$TARGET_SOCS --round=5 --model_graph_format=file --model_data_format=file || exit 1;
python tools/converter.py convert --config=${CONF_FILE} --target_socs=$TARGET_SOCS --model_graph_format=code --model_data_format=file || exit 1;
python tools/converter.py run --config=${CONF_FILE} --target_socs=$TARGET_SOCS --round=1 --validate --model_graph_format=code --model_data_format=file || exit 1;
python tools/converter.py run --config=${CONF_FILE} --target_socs=$TARGET_SOCS --example --round=1 --validate --model_graph_format=code --model_data_format=file || exit 1;
python tools/converter.py benchmark --config=${CONF_FILE} --target_socs=$TARGET_SOCS --round=5 --model_graph_format=code --model_data_format=file || exit 1;
- rm -rf mace-models
quantization_tests:
......
......@@ -252,7 +252,8 @@ Convert model(s) to C++ code
// Create Engine from compiled code
create_engine_status =
CreateMaceEngineFromCode(model_name.c_str(),
model_data_file, // empty string if model_data_format is code
model_data_ptr, // nullptr if model_data_format is code
model_data_size, // 0 if model_data_format is code
input_names,
output_names,
device_type,
......
......@@ -292,8 +292,8 @@ int Main(int argc, char **argv) {
#ifdef MODEL_GRAPH_FORMAT_CODE
create_engine_status =
CreateMaceEngineFromCode(FLAGS_model_name,
model_weights_data.data(),
model_weights_data.size(),
model_weights_data,
model_weights_data_size,
input_names,
output_names,
config,
......
......@@ -158,7 +158,8 @@ Java_com_xiaomi_mace_JniMaceUtils_maceMobilenetCreateEngine(
mace::MaceStatus create_engine_status =
CreateMaceEngineFromCode(mace_context.model_name,
std::string(),
nullptr,
0,
input_names,
output_names,
config,
......
......@@ -285,8 +285,8 @@ bool RunModel(const std::vector<std::string> &input_names,
// to model_data_file parameter.
create_engine_status =
CreateMaceEngineFromCode(FLAGS_model_name,
model_weights_data.data(),
model_weights_data.size(),
model_weights_data,
model_weights_data_size,
input_names,
output_names,
config,
......
......@@ -268,8 +268,8 @@ bool RunModel(const std::string &model_name,
#ifdef MODEL_GRAPH_FORMAT_CODE
create_engine_status =
CreateMaceEngineFromCode(model_name,
model_weights_data.data(),
model_weights_data.size(),
model_weights_data,
model_weights_data_size,
input_names,
output_names,
config,
......@@ -349,8 +349,8 @@ bool RunModel(const std::string &model_name,
#ifdef MODEL_GRAPH_FORMAT_CODE
create_engine_status =
CreateMaceEngineFromCode(model_name,
model_weights_data.data(),
model_weights_data.size(),
model_weights_data,
model_weights_data_size,
input_names,
output_names,
config,
......@@ -392,8 +392,8 @@ bool RunModel(const std::string &model_name,
#ifdef MODEL_GRAPH_FORMAT_CODE
create_engine_status =
CreateMaceEngineFromCode(model_name,
model_weights_data.data(),
model_weights_data.size(),
model_weights_data,
model_weights_data_size,
input_names,
output_names,
config,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册