bug fixes for new MirrorPadGrad NMS IOU comparison

This commit is contained in:
danish 2020-09-03 18:16:41 -04:00
parent 12ff0be5fa
commit a46fb8dd9f
2 changed files with 2 additions and 2 deletions

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

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