MCPcopy 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
160def 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
168def predict(p_y):

Callers 3

mainFunction · 0.90
benchmark_fullFunction · 0.70
benchmark_pcaFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected