Open 18463105800 opened 7 years ago
I found that if the label is (10,1) can do subtraction
function backward should be modified: self.W_grad = np.array(mat(delta_array).T * mat(self.input))
I suggest you change the list format of the data(train and test) to an array type. np.array(data)
When I used the fc.py to train the MINIST,it happened a error: File "D:\pycharm\project\fc.py", line 107, in calc_gradient ) * (label - self.layers[-1].output) ValueError: operands could not be broadcast together with shapes (10,) (10,300)