cpu batch norm works

This commit is contained in:
Joseph Redmon
2016-11-18 21:51:36 -08:00
parent c6afc7ff14
commit 62235e9aa3
12 changed files with 119 additions and 77 deletions

View File

@ -27,8 +27,8 @@ maxpool_layer make_maxpool_layer(int batch, int h, int w, int c, int size, int s
l.w = w;
l.c = c;
l.pad = padding;
l.out_w = (w + 2*padding - size + 1)/stride + 1;
l.out_h = (h + 2*padding - size + 1)/stride + 1;
l.out_w = (w + 2*padding)/stride;
l.out_h = (h + 2*padding)/stride;
l.out_c = c;
l.outputs = l.out_h * l.out_w * l.out_c;
l.inputs = h*w*c;
@ -57,8 +57,8 @@ void resize_maxpool_layer(maxpool_layer *l, int w, int h)
l->w = w;
l->inputs = h*w*l->c;
l->out_w = (w + 2*l->pad - l->size + 1)/l->stride + 1;
l->out_h = (h + 2*l->pad - l->size + 1)/l->stride + 1;
l->out_w = (w + 2*l->pad)/l->stride;
l->out_h = (h + 2*l->pad)/l->stride;
l->outputs = l->out_w * l->out_h * l->c;
int output_size = l->outputs * l->batch;