MichalDanielDobrzanski / DeepLearningPython

neuralnetworksanddeeplearning.com integrated scripts for Python 3.5.2 and Theano with CUDA support
MIT License
2.79k stars 1.27k forks source link

ValueError: shapes (15,728) and (784,1) not aligned: 728 (dim 1) != 784 (dim 0) #27

Closed will-maclean closed 4 years ago

will-maclean commented 4 years ago

Getting this error on line: z = np.dot(w, activation)+b

In Network.backprop(), in this snippet:

for b, w in zip(self.biases, self.weights):
            z = np.dot(w, activation)+b
            zs.append(z)
            activation = sigmoid(z)
            activations.append(activation)

Anyone got any ideas what's going wrong?

xXCoolinXx commented 4 years ago

How did you resolve the issue?