Add support for keras models for outputs #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To follow up on #5, here's what I worked out: Keras layer building turned out to be too much of a challenge for me, so I modified pyESN to optionally accept a Keras model as an input. Now, instead of learning linear weights to map readouts to outputs, it trains the Keras model to do so. If you don't think that this is appropriate to be included in the main code, that's totally fine. I just wanted to share what I did.
Here's mackey.ipynb, modified to use my new functionality. The performance is worse, but it shows how it works. (GitHub won't let me upload
.ipynb,
so I changed the file extension to.txt
. Just change it back to view.)I added a new test, but it would only catch the most extreme errors. I wasn't sure of what to include in a more useful test.
The freq_gen performance test fails both before and after my changes.Also, I'd like to add a
.gitignore
. Should I open a new PR or can I just add it to this one?