This commit is contained in:
Gustav Louw 2018-05-19 16:26:44 -07:00
parent 06e16a6fc4
commit 21047e6464
1 changed files with 2 additions and 2 deletions

4
Tinn.c
View File

@ -87,7 +87,7 @@ static void fprop(const Tinn t, const float* const in)
} }
// Randomizes tinn weights and biases. // Randomizes tinn weights and biases.
static void twrand(const Tinn t) static void wbrand(const Tinn t)
{ {
for(int i = 0; i < t.nw; i++) t.w[i] = frand() - 0.5f; for(int i = 0; i < t.nw; i++) t.w[i] = frand() - 0.5f;
for(int i = 0; i < t.nb; i++) t.b[i] = frand() - 0.5f; for(int i = 0; i < t.nb; i++) t.b[i] = frand() - 0.5f;
@ -123,7 +123,7 @@ Tinn xtbuild(const int nips, const int nhid, const int nops)
t.nips = nips; t.nips = nips;
t.nhid = nhid; t.nhid = nhid;
t.nops = nops; t.nops = nops;
twrand(t); wbrand(t);
return t; return t;
} }