We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1ec289 commit befbb7eCopy full SHA for befbb7e
ann_logistic_extra/ann_train.py
@@ -67,7 +67,7 @@ def cross_entropy(T, pY):
67
68
# gradient descent
69
W2 -= learning_rate*Ztrain.T.dot(pYtrain - Ytrain_ind)
70
- b2 -= learning_rate*(pYtrain - Ytrain_ind).sum()
+ b2 -= learning_rate*(pYtrain - Ytrain_ind).sum(axis=0)
71
dZ = (pYtrain - Ytrain_ind).dot(W2.T) * (1 - Ztrain*Ztrain)
72
W1 -= learning_rate*Xtrain.T.dot(dZ)
73
b1 -= learning_rate*dZ.sum(axis=0)
0 commit comments