cazala / synaptic

architecture-free neural network library for node.js and the browser
http://caza.la/synaptic
Other
6.92k stars 665 forks source link

fromJSON() and toJSON() with Architect.Perceptron #189

Open vishiswoz opened 7 years ago

vishiswoz commented 7 years ago

Current I'm doing this var network = new Architect.Perceptron(inputs, 5, 5, outputs);

Then I do var networkJSON = network.toJSON()

Except now I can't do var originalNetwork = Network.fromJSON(networkJSON)

Because originalNetwork is a Network and I want a Architect, or will there be no differences between the 2? Sorry if this seems like a stupid question, I'm new to this stuff.

Jabher commented 7 years ago

Yup. That's an issue :D We were discussing it previously, and this is one of reasons to implement synaptic 2.

vishiswoz commented 7 years ago

Is there any temporary fix I can implement? Cause it's from my understanding that synaptic 2 will take a while to be implemented.

Jabher commented 7 years ago

I'm afraid I cannot give you any good solution right now, but as far as I remember it should not be that complicated, I've been trying to implement some dirty fix for that some time ago and it was quite simple.

vishiswoz commented 7 years ago

Is there any way I can create a new Architect.Perceptron from the Network I have and just copy over any key/data I need to? To clarify, my Architect.Perceptron doesn't use a trainer or any propagation.

Peterard commented 6 years ago

Bump