[MSLITE]修复CAFFE权重文件不存在导致转换工具crash问题 #4
Loading…
Reference in New Issue
No description provided.
Delete Branch "p80627345/mindspore:master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What does this PR do / why do we need it:
修复CAFFE权重文件不存在导致转换工具crash。
问题根因:ConverterFuncGraph::Build()内部调用Load3rdModelToFuncgraph(param)加载caffe模型失败,返回的func_graph指针为null,下方SetIsGraphDynamicShapeAttr(func_graph)未校验入参直接使用,解引用空指针导致crash。
解法:补充对Load3rdModelToFuncgraph(param)的输出func_graph判空,另外补充ut看护此场景。
Which issue(s) this PR fixes:
Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.