Skip to content

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