For the simple AND learning with a perceptron, it is required to have two inputs x1 and x2 and one target data y.

enter image description here

Most AND examples (such as in the book "Fundamentals of neural network-fausett") have this network topology in the figure above, that is 2 inputs(x1,x2) and 1 output(o). My question is, how do we give the network the target data (y) if there is only two inputs(x1,x2)?

  • $\begingroup$ The target data is the desired value for the output. (x1,x2) match to the inputs, (y) matches to the output. $\endgroup$ Sep 27, 2016 at 20:05

1 Answer 1


The target data is the desired output that happens to be in the real word. This information is known to you already(given the problem is supervised learning problem). So, for an 'AND' gate the target value is the vector stored in y on the right hand side as shown below:

x1    x2      y(desired output)
0     0          0
0     1          0
1     0          0
1     1          1

So this vector y = [0,0,0,1] is your target to these input types that you feed into the network as labels corresponding to your above input data.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.