Bias updates bug fix

This commit is contained in:
Joseph Redmon
2015-01-27 13:31:06 -08:00
parent 809f924db2
commit 153705226d
9 changed files with 52 additions and 30 deletions

View File

@ -233,6 +233,14 @@ float constrain(float a, float max)
return a;
}
float mse_array(float *a, int n)
{
int i;
float sum = 0;
for(i = 0; i < n; ++i) sum += a[i]*a[i];
return sqrt(sum/n);
}
void normalize_array(float *a, int n)
{
int i;