Ondrej Vesely
2009-03-02 19:58:10 UTC
Hi,
could anybody help me to solve quite confusing problem with simple usage of
FANN with C? There is no usable solution in e-mail archive or forum :(.
The point is that trained FANN produces the same output with different
input data. (Simmilar to this experience:
http://leenissen.dk/fann/forum/viewtopic.php?t=354&sid=741b1074786eaefcde263f802359800b
)
To be more specific:
--- head of input learning file --
1107 3 1
9 1 0
1
8 1 0
1
9 1 17
1
5 1 17
-1
I process the file with a variation of tutorial example which makes the
network in file.
This testing code produces table with numbers. Each numbers are the same.
--- main part of testing code
fann_type input[3];
int p,i;
struct fann *ann = fann_create_from_file("icq.net");
input[0] = (fann_type) 9; /* the same parameter */
for(p=0;p<24;p++) { /* makes a table with output data */
for(i=0;i<7;i++) {
input[0]=i;
input[1]=p;
calc_out = fann_run(ann, input);
printf("%.2f\t",calc_out);
}
putchar('\n');
}
The really confusing fact is, that every execution of testing code produces
different data (a table filled with one repeating number).
I have tried different header files (fann.h, doublefann.h) and two different
version of FANN library (2.1.0 and 2.0.0).
Thanks for any help :).
Ondrej
could anybody help me to solve quite confusing problem with simple usage of
FANN with C? There is no usable solution in e-mail archive or forum :(.
The point is that trained FANN produces the same output with different
input data. (Simmilar to this experience:
http://leenissen.dk/fann/forum/viewtopic.php?t=354&sid=741b1074786eaefcde263f802359800b
)
To be more specific:
--- head of input learning file --
1107 3 1
9 1 0
1
8 1 0
1
9 1 17
1
5 1 17
-1
I process the file with a variation of tutorial example which makes the
network in file.
This testing code produces table with numbers. Each numbers are the same.
--- main part of testing code
fann_type input[3];
int p,i;
struct fann *ann = fann_create_from_file("icq.net");
input[0] = (fann_type) 9; /* the same parameter */
for(p=0;p<24;p++) { /* makes a table with output data */
for(i=0;i<7;i++) {
input[0]=i;
input[1]=p;
calc_out = fann_run(ann, input);
printf("%.2f\t",calc_out);
}
putchar('\n');
}
The really confusing fact is, that every execution of testing code produces
different data (a table filled with one repeating number).
I have tried different header files (fann.h, doublefann.h) and two different
version of FANN library (2.1.0 and 2.0.0).
Thanks for any help :).
Ondrej