Hi there!You are doing everything right so far. However, I believe you are using old code. Perhaps you are using the code that originally came with the Packt book? The reason you are seeing this error is because there is a bug in chapter7/classifiers.py.The quick-and-dirty way to fix this is to change the constructor of class MultiLayerPerceptron (chapter7/classifiers.py, around line 196) by adding:
A better solution would be to download the latest code from my GitHub profile. It has a lot more bug fixes and improvements, and I keep making changes to it. This might help you especially on Raspberry Pi.To get the latest code, open a terminal and type:etc.You might have to install git first.Best,Michael
I solved the problem.Thanks for helping solve the problem!!
I am running chapter7.py.
I had installed opencv.However, these errors occur.
There is a lot of difficulties on the computer.
Can you help me?