1

I want to model a NN that solves the XOR problem, so I know that a solution to

x1 xor x2 = (x1 or x2) and not(x1 and x2)

so I have the following models of NN:

enter image description here

The problem that I have is when I want to connect these partial neural networks, I made a solution like this:

enter image description here

but I dont get the values of the XOR function. I have seen a solution using these set of neural networks, but they obtain the values of x1 XNOR x2, so they use:

x1 and x2

not x1 and not x2

and at the end they join both values with the NN that represents the OR.

The question that I have is how to join my partial neural networks to have a neural network of one hidden layer that uses the forward propagation algorithm. The activation function is the sigmoid one.

Any help?

Little
  • 3,363
  • 10
  • 45
  • 74
  • Possible duplicate of [Clarification on a Neural Net that plays Snake](http://stackoverflow.com/questions/42099814/clarification-on-a-neural-net-that-plays-snake) – devinbost Feb 15 '17 at 20:38

1 Answers1

0

The issue with the merging of your partial neural networks is, that you mix the 'not' (at node a2) and the second 'and' (between a1 and a2) operations together. This does not work the way you did it.

You can either do the 'not' operation separately and make another node after a2 and then do the 'and' operation with the new node and a1.

Alternatively you can adjust the weight of the second bias (a0) to -10.

crimeson
  • 26
  • 3