diff --git a/mindspore/_extends/parallel_compile/tbe_compiler/compiler.py b/mindspore/_extends/parallel_compile/tbe_compiler/compiler.py index f6e7c0f1d9..118ed80d28 100755 --- a/mindspore/_extends/parallel_compile/tbe_compiler/compiler.py +++ b/mindspore/_extends/parallel_compile/tbe_compiler/compiler.py @@ -115,7 +115,6 @@ def build_op(build_type, json_str, tune_mode=None): # call function if is_dynamic_shape: - # with te.op.dynamic(): import tbe.common.context.op_context as op_context with op_context.OpContext("dynamic"): op_info = operator_info.OpInfo(op_type, op_type) diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc b/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc index 50e34a9227..e4ee2559f5 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc @@ -1214,6 +1214,9 @@ bool TransposeImpl(const LiteMat &src, LiteMat &dst) { } bool Transpose(const LiteMat &src, LiteMat &dst) { + if (src.IsEmpty()) { + return false; + } if (src.data_type_ == LDataType::DOUBLE) { return TransposeImpl(src, dst); } else if (src.data_type_ == LDataType::FLOAT32) { @@ -1540,7 +1543,7 @@ bool GetAffineTransformImpl(LiteMat &src, LiteMat &dst) { } } - double d = -1 / src.ptr(i)[i]; + const double d = -1 / src.ptr(i)[i]; for (int j = i + 1; j < m; j++) { double alpha = src.ptr(j)[i] * d; for (k = i + 1; k < m; k++) { @@ -1876,7 +1879,7 @@ bool ResizePreserveARWithFiller(LiteMat &src, LiteMat &dst, int h, int w, float } // uint8_t *dst_ptr = dst; float varM[2][3] = {{1.0, 0, 0}, {0, 1.0, 0}}; - float divisor = 2.0; + const float divisor = 2.0; int rotationDstWidth = src.width_; int rotationDstHeight = src.height_; if (img_orientation > IM_TOOL_EXIF_ORIENTATION_0_DEG) {