mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
- fixing/aligning CPU implementation of Batch Normalization;
This commit is contained in:
parent
61c9d02ec4
commit
c08d808c3d
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user