Skip to content

Commit 1fa5ae2

Browse files
committed
fix im2col height/width bound check bug (issue #284 identified by
@kmatzen)
1 parent c5dd18f commit 1fa5ae2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/caffe/util/im2col.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ __global__ void im2col_gpu_kernel(const int n, const Dtype* data_im,
2929
for (int j = 0; j < ksize; ++j) {
3030
int h = h_in + i;
3131
int w = w_in + j;
32-
*data_col = (h >= 0 && w >= 0 && h < width && w < height) ?
32+
*data_col = (h >= 0 && w >= 0 && h < height && w < width) ?
3333
data_im[i * width + j] : 0;
3434
data_col += height_col * width_col;
3535
}

0 commit comments

Comments
 (0)