Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
Indexed
MCP
copy
Index your code
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ forward
Function
forward
ann_class2/util.py:160–165 ·
view source on GitHub ↗
(X, W, b)
Source
from the content-addressed store, hash-verified
158
159
160
def
forward(X, W, b):
161
# softmax
162
a = X.dot(W) + b
163
expa = np.exp(a)
164
y = expa / expa.sum(axis=1, keepdims=True)
165
return
y
166
167
168
def
predict(p_y):
Callers
3
main
Function · 0.90
benchmark_full
Function · 0.70
benchmark_pca
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected