hughperkins / clnn

OpenCL backend for Torch nn neural networks library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature request] SpatialMaxPooling in ceil mode

szagoruyko opened this issue · comments

Caffe and Torch use different max pooling, caffe does ceil when computing output size and torch does floor. We have a switch in cudnn https://github.com/soumith/cudnn.torch/blob/master/Pooling.lua#L17, floor() and ceil() functions, and ceil max-pooling is here https://github.com/szagoruyko/imagine-nn/blob/master/SpatialMaxPooling.cu, clnn needs the same switch I think

torch/cunn#106 has the new kernels with ceil, floor and padding support, I think kernels for clnn max pooling have to be taken from this PR.

Ok. Not sure if I have time for this in immediate future. Please consider submitting a PR for this.

Hi Sergey, please confirm whether you would like to implement this yourself, and use assignee to assign it to yourself, or whether you are hoping that I might implement it myself, and provide details on your expectations in terms of api and performance.

Hi Hugh, this one is easy, you just copy kernels from the other PR, you can do it faster than me.

Hi Sergey, thanks. I will take a look :-)

Hi Sergey, merged across to clnn, in master branch. Please check.