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

Function softmax

rl3/es_flappy.py:70–73  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

68K = 2
69
70def softmax(a):
71 c = np.max(a, axis=1, keepdims=True)
72 e = np.exp(a - c)
73 return e / e.sum(axis=-1, keepdims=True)
74
75def relu(x):
76 return x * (x > 0)

Callers 1

forwardMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected