- fixing/aligning CPU implementation of Batch Normalization;

This commit is contained in:
Juan Altmayer Pizzorno 2020-03-23 10:28:48 -04:00
parent 61c9d02ec4
commit c08d808c3d

View File

@ -151,7 +151,7 @@ void normalize_cpu(float *x, float *mean, float *variance, int batch, int filter
for(f = 0; f < filters; ++f){ for(f = 0; f < filters; ++f){
for(i = 0; i < spatial; ++i){ for(i = 0; i < spatial; ++i){
int index = b*filters*spatial + f*spatial + i; int index = b*filters*spatial + f*spatial + i;
x[index] = (x[index] - mean[f])/(sqrt(variance[f]) + .000001f); x[index] = (x[index] - mean[f])/(sqrt(variance[f] + .00001f));
} }
} }
} }