mirror of
https://github.com/glouw/tinn
synced 2024-11-21 22:11:21 +03:00
tinn no longer seeds rng
This commit is contained in:
parent
bcf16644d2
commit
08ada030cb
2
Tinn.c
2
Tinn.c
@ -3,7 +3,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
// Error function.
|
// Error function.
|
||||||
static float err(float a, float b)
|
static float err(float a, float b)
|
||||||
@ -120,7 +119,6 @@ Tinn xtbuild(int nips, int nhid, int nops)
|
|||||||
t.nips = nips;
|
t.nips = nips;
|
||||||
t.nhid = nhid;
|
t.nhid = nhid;
|
||||||
t.nops = nops;
|
t.nops = nops;
|
||||||
srand(time(0));
|
|
||||||
twrand(t);
|
twrand(t);
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
3
test.c
3
test.c
@ -1,5 +1,6 @@
|
|||||||
#include "Tinn.h"
|
#include "Tinn.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <time.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
@ -126,6 +127,8 @@ static Data build(const char* path, const int nips, const int nops)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
// Tinn does not seed the random number generator.
|
||||||
|
srand(time(0));
|
||||||
// Input and output size is harded coded here as machine learning
|
// Input and output size is harded coded here as machine learning
|
||||||
// repositories usually don't include the input and output size in the data itself.
|
// repositories usually don't include the input and output size in the data itself.
|
||||||
const int nips = 256;
|
const int nips = 256;
|
||||||
|
Loading…
Reference in New Issue
Block a user