File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -428,17 +428,16 @@ static void deformable_col2im_kernel(
428428 const int out_w,
429429 scalar_t * grad_im) {
430430 for (int index = 0 ; index != n; ++index) {
431+ const int out_x = index % out_w;
432+ const int out_y = (index / out_w) % out_h;
433+ const int b = (index / (out_w * out_h)) % batch_sz;
431434 const int j = (index / (out_w * out_h * batch_sz)) % kernel_w;
432435 const int i = (index / (out_w * out_h * batch_sz * kernel_w)) % kernel_h;
433436 const int c = index / (out_w * out_h * batch_sz * kernel_w * kernel_h);
434437
435438 int c_per_offset_grp = channels / n_offset_grps;
436439 const int offset_grp = c / c_per_offset_grp;
437440
438- int out_x = index % out_w;
439- int out_y = (index / out_w) % out_h;
440- int b = (index / (out_w * out_h)) % batch_sz;
441-
442441 auto offset_ptr = offset +
443442 (b * n_offset_grps + offset_grp) * 2 * kernel_h * kernel_w * out_h *
444443 out_w;
You can’t perform that action at this time.
0 commit comments