Hi! I’m a complete beginner doing my first ever project, I found a tutorial on a xor fumction neural network, but when I make a put in for example;
1,0
I get the output:
Ans = 1 Ans = 0
My code is:
A1 = [1; 0; 0]; THETA1 = 2rand(2,3) – 1; THETA2 = 2rand(1,3) – 1; Z2 =THETA1 *A1; function [result] = sigmoid(x); result = 1.0 ./ (1.0 + exp(-x)); end
A2 = [1; sigmoid(Z2)]; Z3 THETA2 * A2; h = sigmoid(Z3);
I’m sorry for bad formating and not marking my script in the post, my internet is down, so I had to write this on my phone
submitted by /u/Th3DarkMoon
[link] [comments]