From 08ada030cbb55310111b8d2e87d009c21cee1441 Mon Sep 17 00:00:00 2001 From: Gustav Louw Date: Sun, 1 Apr 2018 15:25:47 -0700 Subject: [PATCH] tinn no longer seeds rng --- Tinn.c | 2 -- test.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Tinn.c b/Tinn.c index e483c9c..412980b 100644 --- a/Tinn.c +++ b/Tinn.c @@ -3,7 +3,6 @@ #include #include #include -#include // Error function. static float err(float a, float b) @@ -120,7 +119,6 @@ Tinn xtbuild(int nips, int nhid, int nops) t.nips = nips; t.nhid = nhid; t.nops = nops; - srand(time(0)); twrand(t); return t; } diff --git a/test.c b/test.c index 7e31c3e..7362aa8 100644 --- a/test.c +++ b/test.c @@ -1,5 +1,6 @@ #include "Tinn.h" #include +#include #include #include @@ -126,6 +127,8 @@ static Data build(const char* path, const int nips, const int nops) int main() { + // Tinn does not seed the random number generator. + srand(time(0)); // 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. const int nips = 256;