Error in perceptron for AND

The bias should be -1 not -1.5 in the following in order to result in 1 or 0 as output

1 Like

Hi, I went back and checked the video and I see why you brought this up. The output value of either 1 or 0 is not meant to simply be Wx+b (in this case, 1x + 1y - 1.5).

It’s a bit glossed over in the video, but 15 or so seconds later, he mentions an activation function, U, which actually converts Wx+b into 1 if positive and 0 if negative.

So think of the perceptron as two chained functions, where z = Wx+b, and U(z) = 1 if z > 0 and 0 if z < 0. Therefore, a bias term of -1.5 correctly calibrates z such that x and y both being 1 will cause the perceptron to output 1 (since 1x + 1y - 1.5 = 0.5 > 0), while any other binary combinations of x and y will cause the perceptron to output 0 (since 1x + 1y - 1.5 would be either -0.5 or -1.5, both of which are < 0).

Hope this helps!

1 Like

Thanks. That does help.

Maybe at some point the diagram should be updated since looks like the output from the big circle is 1 or 0 without any intervening functions.

1 Like

For what it’s worth, at the 8:15 mark in that video, the diagram is altered to reflect the presence of the activation function U. But to your point, I agree that the diagram in your screenshot is confusing and the activation function should be indicated at all times.