Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suspicious output from testFann #1

Open
tordbb opened this issue Mar 10, 2015 · 0 comments
Open

Suspicious output from testFann #1

tordbb opened this issue Mar 10, 2015 · 0 comments

Comments

@tordbb
Copy link

tordbb commented Mar 10, 2015

Hi.
Thanks for a great binding!
I have built FANN 2.2.0, and generated the four mex functions.
Now I am struggling to get a sensible output when using createFann, trainFann and testFann. Please see the matlab commands and outputs below. Should not actualValues equal suggestedValues? Do you have any idea what I am doing wrong?

samples = [...
-1 -1
-1 1
1 -1
1 1];
actualValues = [...
-1
1
1
-1];

numVariables = size(samples,2);
numResults = size(actualValues,2);
connectivity = 1;
max_epochs = 500000;
desired_error = .0000001;
layers = [numVariables 3 5 numResults];

% makeFann;
ann = createFann(layers,connectivity);

ann = trainFann(ann,samples,actualValues,desired_error,max_epochs)

ann =

      layers: [2 3 5 1]
     weights: [35x1 double]
        from: [35x1 double]
          to: [35x1 double]
connectivity: 1

suggestedValues = testFann(ann,samples);

[actualValues suggestedValues]

ans =

-1.0000 0.0000
1.0000 0.0000
1.0000 0.0000
-1.0000 0.0000

suggestedValues =

1.0e-314 *

0.5106
0.5106
0.5114
0.5114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant