        int id_point = 0;
        for (int y = yi_t; y <= yi_b; ++y) {
          if (!between(y, 0, height-1)) continue;
-         for (int x = xi_l; x <= xi_r; +=x) {
+         for (int x = xi_l; x <= xi_r; ++x) {
            if (!between(x, 0, width-1)) continue;
            bias_x[id_point] = 2 * (xf - x); // multiply 2 since it is derivative of square
            bias_y[id_point] = 2 * (yf - y); // multiply 2 since it is derivative of square

         id_point = 0;
         for (int y = yi_t; y <= yi_b; ++y) {
           if (!between(y, 0, height-1)) continue;
           for (int x = xi_l; x <= xi_r; +=x) {
             if (!between(x, 0, width-1)) continue;
             int address = inputImages_strideBatch * b + inputImages_strideHeight * y + inputImages_strideWidth * x + t;
             v += weights[id_point] * inputImages_data[address];

         id_point = 0;
         for (int y = yi_t; y <= yi_b; ++y) {
           if (!between(y, 0, height-1)) continue;
           for (int x = xi_l; x <= xi_r; ++x) {
             if (!between(x, 0, width-1)) continue;
             int address = inputImages_strideBatch * b + inputImages_strideHeight * y + inputImages_strideWidth * x;
             atomicAdd(&gradInputImages_data[address + t], weights[id_point] * gradOutValue_fg);
