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.
This commit is contained in:
Davis King 2016-05-12 19:40:24 -04:00
parent 6f970e1854
commit 022dce43c2
1 changed files with 2 additions and 2 deletions

View File

@ -304,7 +304,7 @@ namespace dlib
template <typename SUBNET>
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 <typename SUBNET>
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_);