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

Method sample_action

rl3/es_mujoco.py:63–68  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

61 return np.tanh(Z.dot(self.W2) + self.b2) * action_max
62
63 def sample_action(self, x):
64 # assume input is a single state of size (D,)
65 # first make it (N, D) to fit ML conventions
66 X = np.atleast_2d(x)
67 Y = self.forward(X)
68 return Y[0] # the first row
69
70 def get_params(self):
71 # return a flat array of parameters

Callers 1

reward_functionFunction · 0.95

Calls 1

forwardMethod · 0.95

Tested by

no test coverage detected