MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / softmax

Function softmax

rl3/es_mnist.py:40–43  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

38
39
40def softmax(a):
41 c = np.max(a, axis=1, keepdims=True)
42 e = np.exp(a - c)
43 return e / e.sum(axis=-1, keepdims=True)
44
45
46def relu(x):

Callers 1

forwardMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected