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

Method grad

rl/cartpole.py:64–67  ·  view source on GitHub ↗
(self, s, a)

Source from the content-addressed store, hash-verified

62 return [self.predict(s, a) for a in range(self.env.action_space.n)]
63
64 def grad(self, s, a):
65 sa = np.concatenate((s, [a]))
66 x = self.featurizer.transform([sa])[0]
67 return x
68
69
70def test_agent(model, env, n_episodes=20):

Callers 15

fitMethod · 0.45
fitMethod · 0.45
fitMethod · 0.45
fitMethod · 0.45
momentum_updatesFunction · 0.45
theano1.pyFile · 0.45
momentum_updatesFunction · 0.45
fitMethod · 0.45
rmspropFunction · 0.45
fitMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 1

transformMethod · 0.45

Tested by 1

rmspropFunction · 0.36