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

Feature Request: Return or save best model after each generation. #9

Closed
wroscoe opened this issue May 28, 2017 · 2 comments
Closed

Comments

@wroscoe
Copy link
Contributor

wroscoe commented May 28, 2017

This is a great. For this to be immediately useful the devol.run() function should return or save the model that had the lowest validation error. This model can then be trained to completion or reinitialized and retrained.

I figured out how to recreate the model but it still requires some tinkering to get it to model.predict(x_test) since the soft max layer is not included.

f = open('Sun May 28 09:53:45 2017.csv')
genomes = f.read().split('\n')
line = genomes[-2] #get last saved model
last = line.split(',')
last = [int(i) for i in last[:-2]] #only get the model parameters.
model = genome_handler.decode(last)
model.summary()
@joeddav
Copy link
Owner

joeddav commented May 29, 2017

Yeah I just went through the same thing when using this on another project. I agree that'd be a great addition, as doing the above ^ is an unnecessary amount of overhead. It should be pretty straightforward to implement as well.

@joeddav
Copy link
Owner

joeddav commented May 29, 2017

Added return of best model, as well as functionality to easily get and/or decode the best model from the csv.

@joeddav joeddav closed this as completed May 29, 2017
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