(self, x)
| 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 |
no test coverage detected