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

Method set_params

rl3/flappy2envs.py:117–124  ·  view source on GitHub ↗
(self, params)

Source from the content-addressed store, hash-verified

115 }
116
117 def set_params(self, params):
118 # params is a flat list
119 # unflatten into individual weights
120 D, M, K = self.D, self.M, self.K
121 self.W1 = params[:D * M].reshape(D, M)
122 self.b1 = params[D * M:D * M + M]
123 self.W2 = params[D * M + M:D * M + M + M * K].reshape(M, K)
124 self.b2 = params[-K:]
125
126
127

Callers 1

reward_functionFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected