modify export mindir

This commit is contained in:
changzherui 2021-03-16 12:58:47 +08:00
parent c03f962cb6
commit 8d907a3c71
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ std::shared_ptr<FuncGraph> LoadMindIR(const std::string &file_name, bool is_lite
} }
// Load parameter into graph // Load parameter into graph
if (endsWith(abs_path_buff, "_graph.mindir")) { if (endsWith(abs_path_buff, "_graph.mindir") && origin_model.graph().parameter_size() == 0) {
int path_len = strlen(abs_path_buff) - strlen("graph.mindir"); int path_len = strlen(abs_path_buff) - strlen("graph.mindir");
memcpy(abs_path, abs_path_buff, path_len); memcpy(abs_path, abs_path_buff, path_len);
abs_path[path_len] = '\0'; abs_path[path_len] = '\0';