MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / forward

Function forward

ann_logistic_extra/ann_predict.py:26–28  ·  view source on GitHub ↗
(X, W1, b1, W2, b2)

Source from the content-addressed store, hash-verified

24 return expA / expA.sum(axis=1, keepdims=True)
25
26def forward(X, W1, b1, W2, b2):
27 Z = np.tanh(X.dot(W1) + b1)
28 return softmax(Z.dot(W2) + b2)
29
30P_Y_given_X = forward(X, W1, b1, W2, b2)
31print("P_Y_given_X.shape:", P_Y_given_X.shape)

Callers 1

ann_predict.pyFile · 0.70

Calls 1

softmaxFunction · 0.70

Tested by

no test coverage detected