In the network.toJSON() function, RELU was not included as squash type to convert to json for neurons.
How to cause an error with this:
// create a network
var network = new Architect.Perceptron(1,2,1);
// change squash function of neuron 0 in hidden layer
network.layers.hidden[0].list[0].squash = Neuron.squash.RELU;
// convert to json and check squash
console.log(network.toJSON().neurons[1].squash)
This will log null as squash function. Right now, if you use neurons with this squash function and save the network for later, it would convert null to Neuron.squash.LOGISTIC so your saved network will function differently after loaded with Network.fromJSON(). by merging this pull request the squash type will be saved correctly for RELU.
In the
network.toJSON()
function,RELU
was not included as squash type to convert to json for neurons.How to cause an error with this:
This will log
null
as squash function. Right now, if you use neurons with this squash function and save the network for later, it would convertnull
toNeuron.squash.LOGISTIC
so your saved network will function differently after loaded withNetwork.fromJSON()
. by merging this pull request the squash type will be saved correctly forRELU
.