updates and things

This commit is contained in:
Joseph Redmon
2016-09-01 16:48:41 -07:00
parent aebe937710
commit 8f1b4e0962
45 changed files with 44944 additions and 2747 deletions

View File

@ -585,6 +585,13 @@ float rand_uniform(float min, float max)
return ((float)rand()/RAND_MAX * (max - min)) + min;
}
float rand_scale(float s)
{
float scale = rand_uniform(1, s);
if(rand()%2) return scale;
return 1./scale;
}
float **one_hot_encode(float *a, int n, int k)
{
int i;