PyramidLevelLayer for spatial pyramid pooling [under development, don't merge]#641
PyramidLevelLayer for spatial pyramid pooling [under development, don't merge]#641ronghanghu wants to merge 1 commit intoBVLC:devfrom
Conversation
|
@kloudkl this is my implementation for PyramidLevelLayer (still under development, haven't been tested yet). Once tested, it can be used for spatial pyramid pooling. |
|
The first version of #560 looked exactly like what you did here. It copied the related layers instead of directly re-using them. Please refer to @shelhamer's and @Yangqing's comments on the original implementation of #560. The latter was deleted but still sent to my email. The words are pasted here FYI. Please help review a simpler solution in a189891 "Pooling layer allows float heights and widths for kernels and strides". It builds upon your rectangular pooling layer. Thanks! |
Note: DO NOT use the code now, for it is incomplete and under development.
This is a PyramidLevelLayer implementation, which can be used to build spatial pyramids, especially designed for #560 (Spatial Pyramid Pooling).
The pooling region is calculated in the following way:
A pooling region starts with
hstart(include) and ends withhend(exclude):hstart = floor(ph * bin_size_h_)hend = ceil((ph + 1) * bin_size_h_)where
bin_size_h_ = float(bottom[0]->height()) / bin_num_h_is float-point bin lengthand similar for
wstartandwendI will add tests and update.