Closed havenS closed 7 years ago
There is no to/fromJSON function for layers. If you just have a standalone layer, you could save the the neuron biases manually. If you have connections to the layer (implying you have multiple layers), then you can form a network out of it and make a json from it.
Hi @wagenaartje thank you for your answer, I'm not event 100% sure of my current setup. I'll continue to explore other options like the network. Cheers
@havenS
Oh, and just to clarify why there are no toJSON methods for layers or neurons. Because layers and neurons on themselves are connectionless! Yes, they might be connected, but when you convert a layer to a json file and back again then these connections are not 'connected'. Each connection has its own unique id and is referenced on 2 places; at the projecting neuron and at the receiving neuron. If you just convert one of these neurons to json, then you will only have half of the connection -> thus the connection is dead.
However, if youre goal is really just to save neuron biases in a layer, then take a look at my extended synaptic library, Gynaptic it includes a toJSON()
and fromJSON()
for layers and neurons!
Thank you very much for the explanation. In fact, I easily reproduced my Layers
setup with the Network
and thus was able to save to JSON. I'll check on Gynaptic if the need to save Layers
shows up again. Anyway thank you again for the time you spent answering me.
Cheers
Hi,
I'm new to synaptic and, more globally, to NN so please excuse my lack of knowledge. I'm using
Layers
, once trained, I'd like to store it like it's done forNetwork
(toJSON()
) but I can't see how to do it. Do I have to create a network with thoseLayers
to get the JSON ? If so, can I get myLayers
back decoupled after usingfromJSON()
? Thank you very much for all you work.