Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
62
K = 2
63
64
def
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
69
def
relu(x):
70
return
x * (x > 0)
Callers
1
forward
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected