-
Notifications
You must be signed in to change notification settings - Fork 665
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
use seeded randomness #335
Comments
Yes, but a fine tuned NN will perform very similar on each run. Also, if you want to increase the prediction score you want to run a swarm of NNs (at least 8) and median their output. So different results are actually a good thing. |
For my use case (a game) I need reproducible output. Note for those who want randomness for the swarm use case you mention for example, different seeds can be given. The point here is that if the library do not allow to set a seed (could be optional as mentioned), the only way to have reproducible output is to monkey patch Math.random |
+1, determinism is a plus and I see no downside |
Hi, I just came across this, and it wouldn't hurt to have seeded randomness. If you would like I can work on this and create a pull request. I have previously used seedrandom, in my sample neural network library. There is a np version of this library as well if needed. If some one can assign me this task please let me know. Thanks |
I would say that just adding something like a |
That would be much better. I will retract my statement saying I can work on it since I am not sure how I would go about implanting it. I might still give it a try, to help me learn. |
Currently synaptic use Math.random inside the code like
https://github.com/cazala/synaptic/blob/master/src/Neuron.js#L60
This means when you create a neural network, it will behave differently when run in different computers / different times
It would be a good idea to (maybe optionally) specify a seed that get used for all randomness execution.
Currently I can just monkey-patch Math.random for that but this is not ideal.
The text was updated successfully, but these errors were encountered: