Skip to content

Conversation

enginefeeder101
Copy link
Contributor

@enginefeeder101 enginefeeder101 commented Feb 10, 2018

I added functions for serialization and deserialization of the Matrix and NeuralNetwork classes.
For the Matrix library I added a test as well.

You can now save the state of your NeuralNetwork:

let nn = new NeuralNetwork(2,2,1);
localStorage.setItem('nn', nn.serialize())

Continue using the NeuralNetwork:

let nn = NeuralNetwork.deserialize(localStorage.getItem('nn'));

@shiffman
Copy link
Member

Amazing, this is one I wanted to do a tutorial about so you might see me live coding this feature soon. . hopefully I'll remember to reference and thank this pull request!

@shiffman shiffman merged commit 37051d9 into CodingTrain:master Feb 10, 2018
@enginefeeder101 enginefeeder101 deleted the savestate branch February 10, 2018 15:21
enginefeeder101 added a commit to enginefeeder101/Toy-Neural-Network-JS that referenced this pull request Feb 10, 2018
This uses CodingTrain#50 to load an already trained NeuralNetwork. The NeuralNetwork
has been trained using the sketch.js example with 6 times the whole MNIST
library with decreasing learning rate over time.
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.

2 participants