Closed wolfieboy09 closed 1 year ago
those AND and OR perceptrons are supposed to take 2 inputs (and then return the AND or the OR of them). here than means that x
should be a "vector" (or list) of length 2.
you seem to be giving it a list of length 1, that's causing your error.
the NOT perceptron takes only a single input, I think maybe you meant to use not_weights
and not_bias
in your last set of examples.
Oh, I did not see that I accidentally put or_weight
and or_bias
in the file until now. That will fix it
Code:
So I am doing the Neural Networks section, and I am getting the error
AssertionError: vectors must be same length
Traceback:
I am doing the exact code form the book (and downloaded the
scratch
file from this repo) and it does not want to work.