Skip to content

Commit

Permalink
Fix global axis
Browse files Browse the repository at this point in the history
  • Loading branch information
l-bat committed Dec 24, 2019
1 parent 543e030 commit cf477f7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/dnn/src/layers/pooling_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer
else
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);
if (kernel_size.size() == 2) {
kernel = Size(kernel_size[1], kernel_size[0]);
Expand Down Expand Up @@ -126,6 +124,7 @@ class PoolingLayerImpl CV_FINAL : public PoolingLayer
CV_Error(Error::StsBadArg, "Cannot determine pooling type");
setParamsFrom(params);
ceilMode = params.get<bool>("ceil_mode", true);
global_axis = params.get<int>("global_axis", -1);
spatialScale = params.get<float>("spatial_scale", 1);
avePoolPaddedArea = params.get<bool>("ave_pool_padded_area", true);
}
Expand Down

0 comments on commit cf477f7

Please sign in to comment.