synaptic
synaptic copied to clipboard
To the output is always 1.
Hi. Sorry for the stupid question. Two input neurons (0,1 or 0,0). And one output neuron (0 or 1). My task is to teach the network to calculate what will be the inputs (0,0 or 0,1) to the output is always 1.
How can I implement my task?
To be honest, I have no idea what you're trying to do.
But did you look at the wiki page? How to train your network is described there.
I am not sure I'v understood the question, so I am presuming that you want to implement this :
var myNetwork = new Architect.Perceptron(2, 1)
var trainer = new Trainer(myNetwork)
var trainingSet = [
{
input: [0,0],
output: [1]
},
{
input: [0,1],
output: [1]
}
]
trainer.train(trainingSet);
Also add training data for what to be if you have 0.5 and 0.5 as input. Otherwise there is nothing to learn lol
Maybe the way to create the architecture it's a problem too (one parameter it's was missing):
new Architect.Perceptron(2, 2, 1); //2 inputs, 1 hidden layer with 2 neurons and 1 output.
Just read this and you got it: https://github.com/cazala/synaptic/wiki/Trainer