synaptic icon indicating copy to clipboard operation
synaptic copied to clipboard

To the output is always 1.

Open antonhauff opened this issue 7 years ago • 4 comments

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?

antonhauff avatar Oct 19 '17 13:10 antonhauff

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.

FM-96 avatar Oct 23 '17 21:10 FM-96

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);

bashz avatar Nov 05 '17 20:11 bashz

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

ghost avatar Feb 09 '18 03:02 ghost

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

LuKks avatar Mar 03 '18 06:03 LuKks