Commit 022dce43 authored by Davis King's avatar Davis King

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.
parent 6f970e18
...@@ -304,7 +304,7 @@ namespace dlib ...@@ -304,7 +304,7 @@ namespace dlib
template <typename SUBNET> template <typename SUBNET>
void forward(const SUBNET& sub, resizable_tensor& output) 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(), _nc!=0?_nc:sub.get_output().nc(),
_stride_y, _stride_x, padding_y_, padding_x_); _stride_y, _stride_x, padding_y_, padding_x_);
...@@ -314,7 +314,7 @@ namespace dlib ...@@ -314,7 +314,7 @@ namespace dlib
template <typename SUBNET> template <typename SUBNET>
void backward(const tensor& computed_output, const tensor& gradient_input, SUBNET& sub, tensor& /*params_grad*/) 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(), _nc!=0?_nc:sub.get_output().nc(),
_stride_y, _stride_x, padding_y_, padding_x_); _stride_y, _stride_x, padding_y_, padding_x_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment