diff --git a/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/mirror_pad_impl.cu b/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/mirror_pad_impl.cu index c1117b85ff8..90286c754c4 100755 --- a/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/mirror_pad_impl.cu +++ b/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/mirror_pad_impl.cu @@ -100,7 +100,7 @@ __global__ void MirrorPadGrad(const size_t size, const T *dy, const int num, con const int padded_y = ((pos / old_width) % old_height) + pad_top_; // copy positions own value into output - dx[pos] = dx[pos] + dy[(block_num * padded_height + padded_y) * padded_width + padded_x]; + dx[pos] = dy[(block_num * padded_height + padded_y) * padded_width + padded_x]; int x_dist_1 = (ap1_x - padded_x - adjust); int y_dist_1 = (ap1_y - padded_y - adjust); diff --git a/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/nms_with_mask_impl.cu b/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/nms_with_mask_impl.cu index 37788fc0a98..0dbe67823f7 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/nms_with_mask_impl.cu +++ b/mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/nms_with_mask_impl.cu @@ -89,7 +89,7 @@ __inline__ __device__ bool IOUDecision(T *output, int box_A_ix, int box_B_ix, in T height = max(y_2 - y_1, T(0)); T combined_area = area[box_A_ix] + area[box_B_ix]; // return decision to keep or remove box - return !(((width * height) / (combined_area - (width * height))) >= IOU_value); + return !(((width * height) / (combined_area - (width * height))) > IOU_value); } // calculate areas for boxes -> sorted by output boxes