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

Method init

rl3/es_mnist.py:62–67  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 self.K = K
61
62 def init(self):
63 D, M, K = self.D, self.M, self.K
64 self.W1 = np.random.randn(D, M) / np.sqrt(D)
65 self.b1 = np.zeros(M)
66 self.W2 = np.random.randn(M, K) / np.sqrt(M)
67 self.b2 = np.zeros(K)
68
69 def forward(self, X):
70 Z = np.tanh(X.dot(self.W1) + self.b1)

Callers 1

es_mnist.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected