Merge pull request #3 from saschagrunert/patch-1

Update README.md to use float instead of double
This commit is contained in:
Gustav Louw 2018-04-02 10:17:57 -07:00 committed by GitHub
commit a3cb4a52a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -10,13 +10,13 @@ Tinn can be compiled with any C++ compiler as well.
int main()
{
double in[] = { 0.05, 0.10 };
double tg[] = { 0.01, 0.99 };
float in[] = { 0.05, 0.10 };
float tg[] = { 0.01, 0.99 };
/* Two hidden neurons */
const Tinn tinn = xtbuild(len(in), 2, len(tg));
for(int i = 0; i < 1000; i++)
{
double error = xttrain(tinn, in, tg, 0.5);
float error = xttrain(tinn, in, tg, 0.5);
printf("%.12f\n", error);
}
xtfree(tinn);