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

Add random_state #26

Open
tlikhomanenko opened this issue Jun 26, 2015 · 2 comments
Open

Add random_state #26

tlikhomanenko opened this issue Jun 26, 2015 · 2 comments

Comments

@tlikhomanenko
Copy link

Hi!

To reproduce of training it is needed set numpy.random.seed at this moment. Why must I do this (what kind of procedure have random state?) Can you add random_state as parameter for the net initialization?

Thanks, Tatiana.

@zueve
Copy link
Owner

zueve commented Jun 29, 2015

For reproduce training you can save network state, with functions like neurolab.tool.get_np / set_np:

net_state = nl.tool.get_np(net)
net.tarain(...)
nl.tool_np(net, net_state) # net return to init state

Or make copy all network:

net2 = net.copy()

Note: some algorithms must use random generator

@tlikhomanenko
Copy link
Author

I want to reproduce in such way:

I have notebook with net training and I want that notebook gives me the same results for different runnings. And one the hack is to set numpy.random.seed, but I don't do this, because another parts can use the global seed. That is why I need to set random state as a parameter while I am creating net.

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