MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / forward

Method forward

rl3/es_mnist.py:69–71  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

67 self.b2 = np.zeros(K)
68
69 def forward(self, X):
70 Z = np.tanh(X.dot(self.W1) + self.b1)
71 return softmax(Z.dot(self.W2) + self.b2)
72
73 def score(self, X, Y):
74 P = np.argmax(self.forward(X), axis=1)

Callers 1

scoreMethod · 0.95

Calls 1

softmaxFunction · 0.70

Tested by

no test coverage detected