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



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)?
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.