Browse Source

fix bug to master

pull/14800/head
shenwei41 4 years ago
parent
commit
8b064cc54d
2 changed files with 5 additions and 3 deletions
  1. +0
    -1
      mindspore/_extends/parallel_compile/tbe_compiler/compiler.py
  2. +5
    -2
      mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc

+ 0
- 1
mindspore/_extends/parallel_compile/tbe_compiler/compiler.py View File

@@ -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)


+ 5
- 2
mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc View File

@@ -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<double>(src, dst);
} else if (src.data_type_ == LDataType::FLOAT32) {
@@ -1540,7 +1543,7 @@ bool GetAffineTransformImpl(LiteMat &src, LiteMat &dst) {
}
}

double d = -1 / src.ptr<double>(i)[i];
const double d = -1 / src.ptr<double>(i)[i];
for (int j = i + 1; j < m; j++) {
double alpha = src.ptr<double>(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) {


Loading…
Cancel
Save