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

Function softmax

ann_logistic_extra/ann_predict.py:22–24  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

20
21# make predictions
22def softmax(a):
23 expA = np.exp(a)
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)

Callers 1

forwardFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected