hughperkins / clnn

OpenCL backend for Torch nn neural networks library
BSD 2-Clause "Simplified" License
126 stars 16 forks source link

[Feature request] SpatialMaxPooling in ceil mode #5

Closed szagoruyko closed 8 years ago

szagoruyko commented 9 years ago

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

szagoruyko commented 9 years ago

https://github.com/torch/cunn/pull/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.

hughperkins commented 9 years ago

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

hughperkins commented 9 years ago

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.

szagoruyko commented 9 years ago

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

hughperkins commented 8 years ago

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

hughperkins commented 8 years ago

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