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

Function softmax

rl3/flappy2envs.py:64–67  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

62K = 2
63
64def softmax(a):
65 c = np.max(a, axis=1, keepdims=True)
66 e = np.exp(a - c)
67 return e / e.sum(axis=-1, keepdims=True)
68
69def relu(x):
70 return x * (x > 0)

Callers 1

forwardMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected