check nullptr
This commit is contained in:
parent
5159463cea
commit
d2759c5752
|
@ -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