Skip to content

Instantly share code, notes, and snippets.

@deleteman
Created January 7, 2023 08:26
Show Gist options
  • Save deleteman/49523a35d792dc56126dbb0cd38e20dd to your computer and use it in GitHub Desktop.
Save deleteman/49523a35d792dc56126dbb0cd38e20dd to your computer and use it in GitHub Desktop.
const synaptic = require('synaptic');
const Layer = synaptic.Layer,
Network = synaptic.Network;
const inputLayer = new Layer(2);
const hiddenLayer = new Layer(15);
const outputLayer = new Layer(1)
inputLayer.project(hiddenLayer);
hiddenLayer.project(outputLayer);
const myNetwork = new Network({
input: inputLayer,
hidden: [hiddenLayer],
output: outputLayer
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment