Xor gate accuracy improvement
After carefully reviewing my code I found a bug in my train and test set.

Bug was in this line:

bottom_right[1] *= -1


should be:

bottom_right[:, 1] *= -1


After that my tensorflow accuracy went up to 99% and my Keras accuracy to 89%.

Anyway if someone has better solution or see something I am doing wrong please let me know :)