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

Method init

rl3/es_flappy.py:85–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 self.f = f
84
85 def init(self):
86 D, M, K = self.D, self.M, self.K
87 self.W1 = np.random.randn(D, M) / np.sqrt(D)
88 # self.W1 = np.zeros((D, M))
89 self.b1 = np.zeros(M)
90 self.W2 = np.random.randn(M, K) / np.sqrt(M)
91 # self.W2 = np.zeros((M, K))
92 self.b2 = np.zeros(K)
93
94 def forward(self, X):
95 Z = self.f(X.dot(self.W1) + self.b1)

Callers 2

__init__Method · 0.45
es_flappy.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected