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

Method forward

rl3/flappy2envs.py:88–90  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

86 self.b2 = np.zeros(K)
87
88 def forward(self, X):
89 Z = self.f(X.dot(self.W1) + self.b1)
90 return softmax(Z.dot(self.W2) + self.b2)
91
92 def sample_action(self, x):
93 # assume input is a single state of size (D,)

Callers 2

sample_actionMethod · 0.95
scoreMethod · 0.95

Calls 1

softmaxFunction · 0.70

Tested by

no test coverage detected