We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53c89dd commit dd15c9aCopy full SHA for dd15c9a
ann_class/forwardprop.py
@@ -42,7 +42,7 @@ def sigmoid(a):
42
def forward(X, W1, b1, W2, b2):
43
Z = sigmoid(X.dot(W1) + b1) # sigmoid
44
# Z = np.tanh(X.dot(W1) + b1) # tanh
45
- # Z = np.maximum(X.dot(W1) + b1) # relu
+ # Z = np.maximum(X.dot(W1) + b1, 0) # relu
46
A = Z.dot(W2) + b2
47
expA = np.exp(A)
48
Y = expA / expA.sum(axis=1, keepdims=True)
0 commit comments