mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
Fix global axis
This commit is contained in:
parent
543e0302d3
commit
cf477f7e9f
@ -95,8 +95,6 @@ public:
|
|||||||
else
|
else
|
||||||
CV_Error(Error::StsBadArg, "Unknown pooling type \"" + pool + "\"");
|
CV_Error(Error::StsBadArg, "Unknown pooling type \"" + pool + "\"");
|
||||||
|
|
||||||
global_axis = params.has("global_axis") ? params.get<int>("global_axis") : -1;
|
|
||||||
|
|
||||||
getPoolingKernelParams(params, kernel_size, globalPooling, pads_begin, pads_end, strides, padMode);
|
getPoolingKernelParams(params, kernel_size, globalPooling, pads_begin, pads_end, strides, padMode);
|
||||||
if (kernel_size.size() == 2) {
|
if (kernel_size.size() == 2) {
|
||||||
kernel = Size(kernel_size[1], kernel_size[0]);
|
kernel = Size(kernel_size[1], kernel_size[0]);
|
||||||
@ -126,6 +124,7 @@ public:
|
|||||||
CV_Error(Error::StsBadArg, "Cannot determine pooling type");
|
CV_Error(Error::StsBadArg, "Cannot determine pooling type");
|
||||||
setParamsFrom(params);
|
setParamsFrom(params);
|
||||||
ceilMode = params.get<bool>("ceil_mode", true);
|
ceilMode = params.get<bool>("ceil_mode", true);
|
||||||
|
global_axis = params.get<int>("global_axis", -1);
|
||||||
spatialScale = params.get<float>("spatial_scale", 1);
|
spatialScale = params.get<float>("spatial_scale", 1);
|
||||||
avePoolPaddedArea = params.get<bool>("ave_pool_padded_area", true);
|
avePoolPaddedArea = params.get<bool>("ave_pool_padded_area", true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user