Joseph Redmon
2016-06-23 178b1a569ce48c142c961d11a55a347c41747e76
src/avgpool_layer.c
@@ -28,8 +28,9 @@
void resize_avgpool_layer(avgpool_layer *l, int w, int h)
{
    l->h = h;
    l->w = w;
    l->h = h;
    l->inputs = h*w*l->c;
}
void forward_avgpool_layer(const avgpool_layer l, network_state state)
@@ -58,7 +59,7 @@
            int out_index = k + b*l.c;
            for(i = 0; i < l.h*l.w; ++i){
                int in_index = i + l.h*l.w*(k + b*l.c);
                state.delta[in_index] = l.delta[out_index] / (l.h*l.w);
                state.delta[in_index] += l.delta[out_index] / (l.h*l.w);
            }
        }
    }