MCPcopy Index your code
hub / github.com/pytorch/tutorials / sample

Method sample

intermediate_source/reinforcement_q_learning.py:147–148  ·  view source on GitHub ↗
(self, batch_size)

Source from the content-addressed store, hash-verified

145 self.memory.append(Transition(*args))
146
147 def sample(self, batch_size):
148 return random.sample(self.memory, batch_size)
149
150 def __len__(self):
151 return len(self.memory)

Callers 6

select_actionFunction · 0.80
optimize_modelFunction · 0.80
recallMethod · 0.80
coding_ddpg.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected