!29338 [MS][LITE] check nullptr for train export file
Merge pull request !29338 from yefeng/203-fix_bug_code_check
This commit is contained in:
commit
30ec060898
|
@ -389,15 +389,15 @@ int TrainExport::ExportNet(const std::vector<mindspore::kernel::LiteKernel *> &k
|
||||||
QuantizationType quant_type) {
|
QuantizationType quant_type) {
|
||||||
std::vector<std::pair<size_t, tensor_info>> map_index;
|
std::vector<std::pair<size_t, tensor_info>> map_index;
|
||||||
std::set<size_t> out_set;
|
std::set<size_t> out_set;
|
||||||
int offset = meta_graph_->allTensors.size();
|
|
||||||
int tensor_idx = offset;
|
|
||||||
quant_type_ = quant_type;
|
|
||||||
if (meta_graph_ == nullptr) {
|
if (meta_graph_ == nullptr) {
|
||||||
int status = ExportInit(model->name_, model->version_);
|
int status = ExportInit(model->name_, model->version_);
|
||||||
if (status != RET_OK) {
|
if (status != RET_OK) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int offset = meta_graph_->allTensors.size();
|
||||||
|
int tensor_idx = offset;
|
||||||
|
quant_type_ = quant_type;
|
||||||
PrepareRemap(offset);
|
PrepareRemap(offset);
|
||||||
|
|
||||||
for (const auto kernel : kernels) {
|
for (const auto kernel : kernels) {
|
||||||
|
|
Loading…
Reference in New Issue