Skip to content
Advertisement

AttributeError: ‘numpy.ndarray’ object has no attribute ‘self’

I started implementing the backend of neural network but got stuck in a code of python. The below is the code for neural Network. While i was making use of the userdefined class in one of the application to be made, i got an error by name attributeError. Please help me out solving it. I tried all the indentation syntax but nothing works.

JavaScript

The Below is the error log which was popped as soon as i run used the defined class in a classification problem.

JavaScript

Advertisement

Answer

According to the Neural Network Back-end theory, the error must be multiplied to the sigmoid of the previous layer activation to get the value of the delta and not the dot product of it. so the errors. self will not be recognized.

change the following code

JavaScript

to

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement