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

Unexpected behavior on adding multiple hidden layers #139

Open
renansd opened this issue Jul 31, 2019 · 1 comment
Open

Unexpected behavior on adding multiple hidden layers #139

renansd opened this issue Jul 31, 2019 · 1 comment

Comments

@renansd
Copy link

renansd commented Jul 31, 2019

I've modified the NeuralNetwork code so the class constructor receives the number of hidden layers and the number of nodes per hidden layer, also modifying the guess and training functions to work with multiple hidden layers. It seems to work but, in the XOR example, as I create NNs with increasing number of hidden layers, the results come back wrong more and more frequently, to the point of at 5 hidden layers I always get wrong answers. Is it something I should expect or maybe there's something wrong with my implementation? My code: https://pastebin.com/iF8UVhSU

@GypsyDangerous
Copy link
Member

I have not looked at your code so there could be something wrong there but I have experienced with my own from-scratch NN that for simple tasks like XOR having lots of hidden layers makes it worse.

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

2 participants