Browse Source

fix fp16 net ocr_cn_no_lstm

tags/v1.1.0
zhaozhenlong 5 years ago
parent
commit
42e2d3d1da
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      mindspore/lite/src/executor.cc
  2. +1
    -1
      mindspore/lite/test/models_onnx_fp16.cfg

+ 2
- 2
mindspore/lite/src/executor.cc View File

@@ -30,9 +30,9 @@ int Executor::CheckInputs(const std::vector<Tensor *> &in_tensors) {
return RET_ERROR;
}
auto shape = inTensor->shape();
bool valid = all_of(shape.begin(), shape.end(), [](int i) { return i > 0; });
bool valid = all_of(shape.begin(), shape.end(), [](int i) { return i >= 0; });
if (!valid) {
MS_LOG(ERROR) << "The shape of input tensor contains zero or negative dimension,"
MS_LOG(ERROR) << "The shape of input tensor contains negative dimension,"
<< "check the model and assign the input shape with method Resize().";
return RET_ERROR;
}


+ 1
- 1
mindspore/lite/test/models_onnx_fp16.cfg View File

@@ -25,7 +25,7 @@ mnist-8.onnx 10
#super-resolution-10.onnx 1
#tinyyolov2-8.onnx 0.3
ml_2012_ocr_cn.onnx 200
#ml_2012_ocr_cn_noLSTM.onnx 0.1
ml_2012_ocr_cn_noLSTM.onnx 1
candy-9.onnx 5
mosaic-9.onnx 4
pointilism-9.onnx 3


Loading…
Cancel
Save