Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ forward
Function
forward
ann_logistic_extra/ann_train.py:40–42 ·
view source on GitHub ↗
(X, W1, b1, W2, b2)
Source
from the content-addressed store, hash-verified
38
return
expA / expA.sum(axis=1, keepdims=True)
39
40
def
forward(X, W1, b1, W2, b2):
41
Z = np.tanh(X.dot(W1) + b1)
42
return
softmax(Z.dot(W2) + b2), Z
43
44
def
predict(P_Y_given_X):
45
return
np.argmax(P_Y_given_X, axis=1)
Callers
1
ann_train.py
File · 0.70
Calls
1
softmax
Function · 0.70
Tested by
no test coverage detected