!13391 modify export mindir

From: @changzherui
Reviewed-by: @zhoufeng54,@kingxian
Signed-off-by: @kingxian
This commit is contained in:
mindspore-ci-bot 2021-03-18 14:42:39 +08:00 committed by Gitee
commit 83fd1691b1
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
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");
memcpy(abs_path, abs_path_buff, path_len);
abs_path[path_len] = '\0';