MCPcopy 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
40def forward(X, W1, b1, W2, b2):
41 Z = np.tanh(X.dot(W1) + b1)
42 return softmax(Z.dot(W2) + b2), Z
43
44def predict(P_Y_given_X):
45 return np.argmax(P_Y_given_X, axis=1)

Callers 1

ann_train.pyFile · 0.70

Calls 1

softmaxFunction · 0.70

Tested by

no test coverage detected