This commit fixes a bug in Caffe frontend which results in incorrect
results when there is an average pooling layer with non squre kernel.
This commit also adds a related regression test.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
op->divisor(coco::AvgPool2D::Divisor::Static);
op->window()->height(spec.window_height());
- // TODO FIX THIS BUG AND ADD TEST
- op->window()->width(spec.window_height());
+ op->window()->width(spec.window_width());
op->stride()->vertical(spec.vertical_stride());
op->stride()->horizontal(spec.horizontal_stride());
--- /dev/null
+layer {
+ name: "data"
+ type: "Input"
+ top: "data"
+ input_param { shape: { dim: 1 dim: 3 dim: 15 dim: 15 } }
+}
+layer {
+ name: "pool"
+ type: "Pooling"
+ bottom: "data"
+ top: "pool"
+ pooling_param {
+ pool: AVE
+ kernel_h: 3
+ kernel_w: 1
+ }
+}