MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / sample_action

Method sample_action

rl2/a3c/worker.py:171–176  ·  view source on GitHub ↗
(self, state, sess)

Source from the content-addressed store, hash-verified

169 return
170
171 def sample_action(self, state, sess):
172 # Make input N x D (N = 1)
173 feed_dict = { self.policy_net.states: [state] }
174 actions = sess.run(self.policy_net.sample_action, feed_dict)
175 # Prediction is a 1-D array of length N, just want the first value
176 return actions[0]
177
178 def get_value_prediction(self, state, sess):
179 # Make input N x D (N = 1)

Callers 1

run_n_stepsMethod · 0.95

Calls 1

runMethod · 0.45

Tested by

no test coverage detected