Browse Source

bug fixes for new MirrorPadGrad NMS IOU comparison

tags/v1.0.0
danish 5 years ago
parent
commit
a46fb8dd9f
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/mirror_pad_impl.cu
  2. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/nms_with_mask_impl.cu

+ 1
- 1
mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/mirror_pad_impl.cu View File

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


+ 1
- 1
mindspore/ccsrc/backend/kernel_compiler/gpu/cuda_impl/nms_with_mask_impl.cu View File

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


Loading…
Cancel
Save