This commit is contained in:
Joseph Redmon
2016-01-18 15:40:14 -08:00
parent 9802287b58
commit 1578ec70d7
33 changed files with 849 additions and 174 deletions

View File

@ -485,9 +485,9 @@ float rand_normal()
}
*/
float rand_uniform()
float rand_uniform(float min, float max)
{
return (float)rand()/RAND_MAX;
return ((float)rand()/RAND_MAX * (max - min)) + min;
}
float **one_hot_encode(float *a, int n, int k)