Question About CudNN V2 Example Code

Hello,
I’ve been modifying the example code to get better understanding about CUDNN library.

My understanding is the following:

Suppose I have 1 image with 1 feature map, of size 20x20:
n = 1, c = 1, h = 5, w = 5.
In particular, the image is:
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1

And then I the following filter:
k=2, c=1, filter_dim=3
In particular, the two kernels are:
for k=1:
0 0 0
0 1 0
0 0 0
and for k=2
0 0 0
0 0 0
0 0 0

When I convolve the image with the filter, shouldn’t I be getting an output image of the following properties?
n=1, c=2, h=3, w=3
In particular,
for c=1:
1 1 1
1 1 1
1 1 1
for c=2:
0 0 0
0 0 0
0 0 0

I tried to print the result of the first convoluteForward() of CUDNN v2 example code, but I’m not getting the behavior that I describe above. Am I not understanding the library correctly?

Never mind this… Turns out my indexing to access the image data was incorrect…