Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to remove neurons? #159

Open
t-mullen opened this issue Oct 29, 2016 · 2 comments
Open

Possible to remove neurons? #159

t-mullen opened this issue Oct 29, 2016 · 2 comments

Comments

@t-mullen
Copy link

Does Synaptic support removal/disconnection of neurons after training?

If not, is there any way to implement dropout?

@wagenaartje
Copy link
Contributor

Yes there is! Well... indirectly though. The good ol' toJSON() allows this.

var network = new synaptic.Architect.Perceptron(2,2,1);
var networkJSON = network.toJSON();
networkJSON.connections.splice(index,1); // e.g. this is how to remove a certain connection
networkJSON.neurons.splice(index,1); // e.g. this is how to remove a certain neuron
network = synaptic.Network.fromJSON(networkJSON); // convert it back

You can even manually remove them by JSON.stringify() and then just deleting one of the elements in the neurons or connections array.

@Jabher
Copy link
Collaborator

Jabher commented Mar 29, 2017

@wagenaartje dropout is required during training phase, I'm afraid this approach will, kinda, make everything veeery slow

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

No branches or pull requests

3 participants