File tree 1 file changed +3
-4
lines changed 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(
428
428
const int out_w,
429
429
scalar_t * grad_im) {
430
430
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;
431
434
const int j = (index / (out_w * out_h * batch_sz)) % kernel_w;
432
435
const int i = (index / (out_w * out_h * batch_sz * kernel_w)) % kernel_h;
433
436
const int c = index / (out_w * out_h * batch_sz * kernel_w * kernel_h);
434
437
435
438
int c_per_offset_grp = channels / n_offset_grps;
436
439
const int offset_grp = c / c_per_offset_grp;
437
440
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
-
442
441
auto offset_ptr = offset +
443
442
(b * n_offset_grps + offset_grp) * 2 * kernel_h * kernel_w * out_h *
444
443
out_w;
You can’t perform that action at this time.
0 commit comments