From 022dce43c2b28755c9faf9577305184a6be6fd0e Mon Sep 17 00:00:00 2001 From: Davis King Date: Thu, 12 May 2016 19:40:24 -0400 Subject: [PATCH] I accidentally turned the max pooling layers into average pooling a few days ago. This fixes that and turns them back into max pooling layers. --- dlib/dnn/layers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlib/dnn/layers.h b/dlib/dnn/layers.h index 6d926f869..ec1757215 100644 --- a/dlib/dnn/layers.h +++ b/dlib/dnn/layers.h @@ -304,7 +304,7 @@ namespace dlib template void forward(const SUBNET& sub, resizable_tensor& output) { - mp.setup_avg_pooling(_nr!=0?_nr:sub.get_output().nr(), + mp.setup_max_pooling(_nr!=0?_nr:sub.get_output().nr(), _nc!=0?_nc:sub.get_output().nc(), _stride_y, _stride_x, padding_y_, padding_x_); @@ -314,7 +314,7 @@ namespace dlib template void backward(const tensor& computed_output, const tensor& gradient_input, SUBNET& sub, tensor& /*params_grad*/) { - mp.setup_avg_pooling(_nr!=0?_nr:sub.get_output().nr(), + mp.setup_max_pooling(_nr!=0?_nr:sub.get_output().nr(), _nc!=0?_nc:sub.get_output().nc(), _stride_y, _stride_x, padding_y_, padding_x_);