Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

DNN Pooling function issues

gustafsson__bengt
415 Views

 

I'm using the dnnPoolingCreateForward_F32() function to create a max pooling but get E_INCORRECT_INPUT_PARAMETER reply.

My test case is very simple: Downsample from 1x2 to 1x1 pixels. Input is:

size_t inSize[4] = { 1, 2, 1, 1 };
... code to create the layout handle.

size_t kernelSize[2] = {1, 1};
size_t kernelStride[2] = {1, 2};
int offsets[2] = {0, 0};

dnnPoolingCreateForward_F32(&handle, attrib, dnnAlgorithmPoolingMax, srcLayout, 
                                                    kernelSize, kernelStride, offsets, dnnBorderZeros);

The call returns said error code.

I noted that the output size calculation equation for pooling is different than for convolution, which seems strange. However, as I am not sending the assumed output size in this can't be the cause of the issue here. (The difference is ceil instead of floor for convolution, and still a trailing + 1, I'm assuming this is a type for now).

I tried appending extra 1's to the kernel stride and size arrays but that didn't help (and didn't seem logical).

Much appreciated if someone has any ideas on what to do about this, the input data seems perfectly reasonable to me, and the error code is not very informative.

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
415 Views

which version of mkl do you use?

0 Kudos
gustafsson__bengt
415 Views

MKL 2018.1

0 Kudos
Reply