Browse Source

fix segment when the input data is null

tags/v0.7.0-beta
zhaodezan 5 years ago
parent
commit
fed8f406ac
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/lite/src/executor.cc

+ 4
- 0
mindspore/lite/src/executor.cc View File

@@ -29,6 +29,10 @@ int Executor::Run(std::vector<tensor::Tensor *> &in_tensors, std::vector<tensor:
MS_LOG(ERROR) << "Graph input tensor is nullptr";
return RET_ERROR;
}
if (inTensor->Data() == nullptr) {
MS_LOG(ERROR) << "Graph input tensor data is nullptr";
return RET_ERROR;
}
if (inTensor->GetFormat() != schema::Format_NHWC) {
MS_LOG(ERROR) << "Model input tensor should be NHWC";
return RET_ERROR;


Loading…
Cancel
Save