From ba385236742d053ba6d401453eb284957245999b Mon Sep 17 00:00:00 2001 From: xiefangqi Date: Wed, 14 Oct 2020 14:59:46 +0800 Subject: [PATCH] fix opencv float exception --- mindspore/ccsrc/minddata/dataset/kernels/image/image_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/image_utils.cc b/mindspore/ccsrc/minddata/dataset/kernels/image/image_utils.cc index 6c40b78751..a09a1612bd 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/image_utils.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/image_utils.cc @@ -98,7 +98,7 @@ Status Resize(const std::shared_ptr &input, std::shared_ptr *out RETURN_STATUS_UNEXPECTED("Input Tensor is not in shape of or "); } // OpenCv lanuch too many threads. - cv::setNumThreads(0); + cv::setNumThreads(8); cv::Mat in_image = input_cv->mat(); // resize image too large or too small if (output_height == 0 || output_height > in_image.rows * 1000 || output_width == 0 ||