Closed szagoruyko closed 8 years ago
I'll push my version of ROIPooling, which is in lua using SpatialAdaptiveMaxPooling
, and seems to perform almost as fast as this cuda
implementation.
I think maybe we should do
if self._type == 'torch.CudaTensor' then
C.inn_ROIPooling_updateOutput(cutorch.getState(),
self.output:cdata(), self.indices:cdata(), data:cdata(), rois:cdata(),
self.W, self.H, self.spatial_scale)
else
-- your lua implementation
end
but before you should push non-contiguous adaptive max pooling to nn and cunn
if it's going to be used only for CPU, then the non contiguous version already in nn
. But I'll push the cuda version as well
I am interested in using the cpu/gpu ROIPooling module. Is the implementation here (as well as the nnf one) ready to be distributed ? Anything I could help contribute ?
@0wu The implementation here is being tested by me and @szagoruyko for some time now and it seems stable. The one in nnf
seems to work exactly as this one, but I still need to finish some tests to be 100% sure.
It would be great if you could write some gradient-tests for ROIPooling
for nnf
cpu version, and also a test comparing inn
implementation to it. This is what is missing to make them ready to be merged.
The gradient tests and comparison to nnf.ROIPooling is submitted in #13
inn.ROIPooling seems to assume the images of one batch are of the same size. Would it be possible to relax this further at least for the cpu version ? An alternative is to have users pad small images to the size of the largest image.
thanks @fmassa and @0wu
TODO: