Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
reinforcement_ppo.py
File · 0.80
select_action
Function · 0.80
optimize_model
Function · 0.80
dqn_with_rnn_tutorial.py
File · 0.80
recall
Method · 0.80
coding_ddpg.py
File · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected