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

Function derivative_w1

ann_class2/mlp.py:31–33  ·  view source on GitHub ↗
(X, Z, T, Y, W2)

Source from the content-addressed store, hash-verified

29 return (Y - T).sum(axis=0)
30
31def derivative_w1(X, Z, T, Y, W2):
32 # return X.T.dot( ( ( Y-T ).dot(W2.T) * ( Z*(1 - Z) ) ) ) # for sigmoid
33 return X.T.dot( ( ( Y-T ).dot(W2.T) * (Z > 0) ) ) # for relu
34
35def derivative_b1(Z, T, Y, W2):
36 # return (( Y-T ).dot(W2.T) * ( Z*(1 - Z) )).sum(axis=0) # for sigmoid

Callers 3

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected