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

Fixed (de)serialization to include activation function. #97

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

enginefeeder101
Copy link
Contributor

This fixes #96 by using a replacer on serialization to preserve the activation function as a string.
On deserialization the function string is eval()-ed. This is dangerous as malicious code could be
executed. Might be possible to port this to using new Function() instead.

This fixes CodingTrain#96 by using a `replacer` on serialization to preserve the activation function as a string.
On deserialization the function string is `eval()`-ed. This is dangerous as malicious code could be
executed. Might be possible to port this to using `new Function()` instead.
enginefeeder101 added a commit to enginefeeder101/Toy-Neural-Network-JS that referenced this pull request Mar 10, 2018
The (de)serialzation functions already have all the code needed to make a deep copy
of the NeuralNetwork. This commit also adds a test for the `Matrix.copy()` function.
This also copies the learning rate and if CodingTrain#97 is merged the activation function is
copied as well.
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

Successfully merging this pull request may close these issues.

NeuralNetwork (de)serialization does not preserve activation function
1 participant