mirror of
https://github.com/glouw/tinn
synced 2025-01-08 03:22:04 +03:00
double to float
This commit is contained in:
parent
0228fdb32e
commit
ae2c658354
6
test.c
6
test.c
@ -151,7 +151,7 @@ int main()
|
|||||||
const float* const tg = data.tg[j];
|
const float* const tg = data.tg[j];
|
||||||
error += xttrain(tinn, in, tg, rate);
|
error += xttrain(tinn, in, tg, rate);
|
||||||
}
|
}
|
||||||
printf("error %.12f :: rate %f\n", error / data.rows, rate);
|
printf("error %.12f :: rate %f\n", (double) error / data.rows, (double) rate);
|
||||||
rate *= anneal;
|
rate *= anneal;
|
||||||
}
|
}
|
||||||
// This is how you save the neural network to disk.
|
// This is how you save the neural network to disk.
|
||||||
@ -165,8 +165,8 @@ int main()
|
|||||||
const float* const in = data.in[0];
|
const float* const in = data.in[0];
|
||||||
const float* const tg = data.tg[0];
|
const float* const tg = data.tg[0];
|
||||||
const float* const pd = xpredict(loaded, in);
|
const float* const pd = xpredict(loaded, in);
|
||||||
for(int i = 0; i < data.nops; i++) { printf("%f ", tg[i]); } printf("\n");
|
for(int i = 0; i < data.nops; i++) { printf("%f ", (double) tg[i]); } printf("\n");
|
||||||
for(int i = 0; i < data.nops; i++) { printf("%f ", pd[i]); } printf("\n");
|
for(int i = 0; i < data.nops; i++) { printf("%f ", (double) pd[i]); } printf("\n");
|
||||||
// All done. Let's clean up.
|
// All done. Let's clean up.
|
||||||
xtfree(loaded);
|
xtfree(loaded);
|
||||||
dfree(data);
|
dfree(data);
|
||||||
|
Loading…
Reference in New Issue
Block a user