forked from huawei/mindspore2022
!4979 fix the segment when the input data is null
Merge pull request !4979 from zhaodezan/master
This commit is contained in:
commit
7098b5c5d5
|
|
@ -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…
Reference in New Issue