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

Method sample_batch

rl3/ddpg.py:77–83  ·  view source on GitHub ↗
(self, batch_size=32)

Source from the content-addressed store, hash-verified

75 self.size = min(self.size+1, self.max_size)
76
77 def sample_batch(self, batch_size=32):
78 idxs = np.random.randint(0, self.size, size=batch_size)
79 return dict(s=self.obs1_buf[idxs],
80 s2=self.obs2_buf[idxs],
81 a=self.acts_buf[idxs],
82 r=self.rews_buf[idxs],
83 d=self.done_buf[idxs])
84
85
86### Implement the DDPG algorithm ###

Callers 1

ddpgFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected