Skip to content

Input Size always 20 #187

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

Closed
konnextv opened this issue Apr 10, 2018 · 6 comments
Closed

Input Size always 20 #187

konnextv opened this issue Apr 10, 2018 · 6 comments

Comments

@konnextv
Copy link

What is wrong?

Whatever array I feed into net.run(), it will always only evaluate 20 items. It will fail on less and stay the same whatever the values after the 20th are.
I already found that one object property is NeuralNetwork.sizes which is [20,10,2] by default but I can't find a way to change this.

@robertleeplummerjr
Copy link
Contributor

Can you share a code sample for context?

@konnextv
Copy link
Author

@konnextv
Copy link
Author

@robertleeplummerjr I just saw your anwer to #188 - I guess I just need to fill the training strings with spaces to allow for longer inputs? I just checked, my shortest training string is exactly 20 characters.

Is there a way to get around this? Maybe use a different network? I want to analyze a string of any length.

  • No, I don't know much about how machine learning works, please excuse if I am asking questions that sound stupid to you :)

@mubaidr
Copy link
Contributor

mubaidr commented Apr 12, 2018

@konnextv
@robertleeplummerjr posted an working code sample here: https://jsfiddle.net/8Lvynxz5/36/

You can use encode and adjustSize functions from this code.

Also, please read this: #188 (comment)

@konnextv
Copy link
Author

@mubaidr Yes I saw that. Just wondered if the network could handle another size of input in order to get the best results (adding spaces to the strings cannot be the best method imo)
Will also look at LSTM networks, however.

@robertleeplummerjr
Copy link
Contributor

ty all for your input to help solve this!

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

3 participants